本文整理汇总了C#中BLL.ReceiveDoc.AddColumn方法的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDoc.AddColumn方法的具体用法?C# ReceiveDoc.AddColumn怎么用?C# ReceiveDoc.AddColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.ReceiveDoc
的用法示例。
在下文中一共展示了ReceiveDoc.AddColumn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FillInReceiveDocInformation
/// <summary>
/// Needs to be the first function to be called when saving a new receive doc entry.
/// </summary>
/// <param name="rec"></param>
/// <param name="receiptID"></param>
/// <param name="dr"></param>
private void FillInReceiveDocInformation(ReceiveDoc rec, int receiptID, DataRowView dr)
{
try
{
rec.GetColumn("GUID");
}
catch
{
rec.AddColumn("GUID", typeof(string));
//rec.AddColumn("IsDamaged", typeof(bool));
//This is only used if the Check box is used to receive damaged receives (For SRM only)
}
rec.StoreID = Convert.ToInt32(lkAccounts.EditValue);
rec.RefNo = txtRefNo.Text;
rec.Remark = txtRemark.Text;
rec.ReceivedBy = CurrentContext.LoggedInUserName;
DateTime xx = dtRecDate.Value;
dtRecDate.CustomFormat = "MM/dd/yyyy";
DateTime dtRec = new DateTime();
rec.Date = ConvertDate.DateConverter(dtRecDate.Text);
dtRec = ConvertDate.DateConverter(dtRecDate.Text);
rec.EurDate = BLL.DateTimeHelper.ServerDateTime;
rec.ItemID = Convert.ToInt32(dr["ID"]);
rec.NoOfPack = Convert.ToDecimal(dr["Pack Qty"]);
rec.SetColumn("GUID", dr["GUID"].ToString());
rec.IsDamaged = Convert.ToBoolean(dr["IsDamaged"]);
if (standardRecType == StandardReceiptType.iGRVOnline)
{
rec.SetColumn("PricePerPack", dr["Price/Pack"]);
rec.SetColumn("Margin", dr["Margin"]);
rec.SetColumn("UnitCost", dr["Price/Pack"]);
}
//TODO: This if is a garbage. Remove
if (dr["InvoicedQty"] == DBNull.Value)
{
rec.InvoicedNoOfPack = rec.NoOfPack;
}
rec.InvoicedNoOfPack = srm ? Convert.ToDecimal(dr["IssuedQty"]) : Convert.ToDecimal(dr["OriginalInvoicedQty"]);
rec.ManufacturerId = Convert.ToInt32(dr["Manufacturer"]);
BLL.ItemManufacturer im = new BLL.ItemManufacturer();
im.LoadIMbyLevel(rec.ItemID, rec.ManufacturerId, 0);
if (dr["UnitID"] != DBNull.Value)
{
// if unit has been set, pick the qty per pack from the unit
rec.UnitID = Convert.ToInt32(dr["UnitID"]);
ItemUnit itemUnit = new ItemUnit();
itemUnit.LoadByPrimaryKey(rec.UnitID);
rec.QtyPerPack = itemUnit.QtyPerUnit;
}
else
{
rec.QtyPerPack = im.QuantityInBasicUnit;
}
rec.Quantity = rec.QuantityLeft = rec.NoOfPack * rec.QtyPerPack;
try
{
if ((deliveryNoteType == DeliveryNoteType.NotSet))
{
if (!BLL.Settings.HandleGRV && !srm)
{
rec.PricePerPack = Convert.ToDouble(dr["Price/Pack"]);
double pre = (Convert.ToDouble(dr["Price/Pack"]) / 1); //rec.QtyPerPack);
rec.Cost = pre;
}
rec.DeliveryNote = false;
}
else
{
rec.DeliveryNote = true;
if (deliveryNoteType == DeliveryNoteType.Automatic)
{
rec.SetColumn("PricePerPack", dr["Price/Pack"]);
rec.SetColumn("Margin", dr["Margin"]);
rec.SetColumn("UnitCost", dr["Price/Pack"]);
}
}
}
catch
{
// catch the error if the recieve doesn't have cost information
// NOTE: this shall never happen.
}
if (dr["Batch No"] != DBNull.Value)
//.........这里部分代码省略.........