private static void AddIssueLodDelete(IssueDoc iss) { IssueDocDeleted isdelete = new IssueDocDeleted(); isdelete.AddNew(); isdelete.ID = iss.ID; isdelete.ItemID = iss.ItemID; isdelete.StoreId = iss.StoreId; isdelete.ReceivingUnitID = iss.ReceivingUnitID; isdelete.LocalBatchNo = iss.LocalBatchNo; isdelete.Quantity = iss.Quantity; isdelete.Date = iss.Date; isdelete.IsTransfer = iss.IsTransfer; isdelete.IssuedBy = iss.IssuedBy; isdelete.Remark = iss.Remark; isdelete.RefNo = iss.RefNo; isdelete.BatchNo = iss.BatchNo; isdelete.IsApproved = iss.IsApproved; isdelete.Cost = iss.Cost; isdelete.NoOfPack = iss.NoOfPack; isdelete.QtyPerPack = iss.QtyPerPack; isdelete.DUSOH = iss.DUSOH; isdelete.EurDate = iss.EurDate; isdelete.RecievDocID = iss.RecievDocID; isdelete.RecomendedQty = iss.RecomendedQty; isdelete.Save(); }
private static void AddIssueDocDeleted(DataRow dataRow) { var isdelete = new IssueDocDeleted(); isdelete.AddNew(); isdelete.ID = (int) dataRow["ID"]; isdelete.ItemID = (int) dataRow["ItemID"]; isdelete.StoreId = (int) dataRow["StoreId"]; isdelete.ReceivingUnitID = (int) dataRow["ReceivingUnitID"]; //isdelete.LocalBatchNo = (string) dataRow["LocalBatchNo"]; isdelete.Quantity = (long) dataRow["Quantity"]; isdelete.Date = (DateTime) dataRow["Date"]; isdelete.IsTransfer = (bool) dataRow["IsTransfer"]; isdelete.IssuedBy = (string) dataRow["IssuedBy"]; //isdelete.Remark = (string) dataRow["Remark"]; isdelete.RefNo = (string) dataRow["RefNo"]; isdelete.BatchNo = (string) dataRow["BatchNo"]; isdelete.IsApproved = (bool) dataRow["IsApproved"]; isdelete.Cost = (double) dataRow["Cost"]; isdelete.NoOfPack = (int) dataRow["NoOfPack"]; isdelete.QtyPerPack = (int) dataRow["QtyPerPack"]; isdelete.DUSOH = (long) dataRow["DUSOH"]; isdelete.EurDate = (DateTime) dataRow["EurDate"]; isdelete.RecievDocID = (int) dataRow["RecievDocID"]; isdelete.RecomendedQty = (long) dataRow["RecomendedQty"]; isdelete.Save(); }
/// <summary> /// Adds a new delete log /// </summary> /// <param name="deletedissDoc">The IssueDoc Object to be deleted</param> /// <param name="userID">The user ID.</param> public static void AddNewLog(IssueDoc deletedissDoc, int userID) { while (!deletedissDoc.EOF) { BLL.IssueDocDeleted issLog = new IssueDocDeleted(); issLog.AddNew(); foreach (DataColumn col in deletedissDoc.DefaultView.Table.Columns) {// the try catch is to make sure the database schema change doesn't mess this method try { issLog.SetColumn(col.ColumnName, deletedissDoc.GetColumn(col.ColumnName)); } catch { } } issLog.DeletedBy = userID; issLog.DateDeleted = DateTimeHelper.ServerDateTime; issLog.Save(); deletedissDoc.MoveNext(); } }