当前位置: 首页>>代码示例>>C#>>正文


C# Products.LockUnlockForSellingByProductSubGroup方法代码示例

本文整理汇总了C#中AceSoft.RetailPlus.Data.Products.LockUnlockForSellingByProductSubGroup方法的典型用法代码示例。如果您正苦于以下问题:C# Products.LockUnlockForSellingByProductSubGroup方法的具体用法?C# Products.LockUnlockForSellingByProductSubGroup怎么用?C# Products.LockUnlockForSellingByProductSubGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AceSoft.RetailPlus.Data.Products的用法示例。


在下文中一共展示了Products.LockUnlockForSellingByProductSubGroup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LockUnlockForSelling

        private void LockUnlockForSelling(string UnLock = "")
        {
            bool isLock = false;

            if (UnLock == "Unlock")
            {
                isLock = false;
            }
            else if (cmdLockUnlockProduct.ToolTip == "unlock")
            {
                isLock = true;
            }

            Products clsProducts = new Products();
            clsProducts.LockUnlockForSellingByProductSubGroup(Int32.Parse(cboBranch.SelectedItem.Value), Int64.Parse(cboProductSubGroup.SelectedItem.Value), isLock);
            clsProducts.CommitAndDispose();

            if (!isLock)
            {
                cmdLockUnlockProduct.Text = "Lock Product Sub Group [<label class='ms-error'>Note:</label>Products under this subgroup are <u>CURRENTLY ALLOWED</u> for Selling]";
                cmdLockUnlockProduct.ToolTip = "unlock";
            }
            else
            {
                cmdLockUnlockProduct.Text = "UnLock Product Sub Group [<label class='ms-error'>Note:</label>Products under this subgroup are <u>CURRENTLY NOT ALLOWED</u> for Selling]";
                cmdLockUnlockProduct.ToolTip = "lock";
            }
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:28,代码来源:_closeinventorysubgroup.ascx.cs

示例2: CloseInventory

        private string CloseInventory()
        {
            string strRetValue = "";

            try
            {
                DateTime DeliveryDate = Convert.ToDateTime(txtClosingDate.Text);

                ERPConfig clsERPConfig = new ERPConfig();
                ERPConfigDetails clsERPConfigDetails = clsERPConfig.Details();

                if (clsERPConfigDetails.PostingDateFrom <= DeliveryDate && clsERPConfigDetails.PostingDateTo >= DeliveryDate)
                {
                    string strReferenceNo = Constants.CLOSE_INVENTORY_CODE + CompanyDetails.BECompanyCode + DateTime.Now.Year.ToString() + clsERPConfig.get_LastClosingNo();

                    AccessUserDetails clsAccessUserDetails = (AccessUserDetails)Session["AccessUserDetails"];

                    ProductInventories clsProductInventories = new ProductInventories(clsERPConfig.Connection, clsERPConfig.Transaction);
                    clsProductInventories.CloseInventoryByProductSubGroup(int.Parse(cboBranch.SelectedItem.Value), clsAccessUserDetails.UID, DateTime.Parse(txtClosingDate.Text), strReferenceNo, long.Parse(cboProductSubGroup.SelectedItem.Value), cboProductSubGroup.SelectedItem.Text);

                    Products clsProducts = new Products(clsERPConfig.Connection, clsERPConfig.Transaction);
                    clsProducts.LockUnlockForSellingByProductSubGroup(int.Parse(cboBranch.SelectedItem.Value), long.Parse(cboProductSubGroup.SelectedItem.Value), false);

                    clsERPConfig.CommitAndDispose();
                    strRetValue = strReferenceNo;
                }
                else
                {
                    clsERPConfig.CommitAndDispose();
                    string stScript = "<Script>";
                    stScript += "window.alert('Sorry you cannot close using the closing date: " + txtClosingDate.Text + ". Please enter an allowable posting date.')";
                    stScript += "</Script>";
                    Response.Write(stScript);
                }
            }
            catch (Exception ex)
            {
                string stScript = "<Script>";
                stScript += "window.alert('An error has occured while closing the inventory. Details:' " + ex.Message + ")";
                stScript += "</Script>";
                Response.Write(stScript);
            }
            return strRetValue;
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:44,代码来源:_closeinventorysubgroup.ascx.cs


注:本文中的AceSoft.RetailPlus.Data.Products.LockUnlockForSellingByProductSubGroup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。