本文整理汇总了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";
}
}
示例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;
}