private static void AddDeletedDisposal(Disposal disposal, out DisposalDelete ddel)
 {
     ddel = new DisposalDelete();
     ddel.AddNew();
     ddel.ID         = disposal.ID;
     ddel.ItemID     = disposal.ItemID;
     ddel.StoreId    = disposal.StoreId;
     ddel.ReasonId   = disposal.ReasonId;
     ddel.Quantity   = disposal.Quantity;
     ddel.Date       = disposal.Date;
     ddel.ApprovedBy = disposal.ApprovedBy;
     ddel.Losses     = disposal.Losses;
     ddel.BatchNo    = disposal.BatchNo;
     ddel.Remark     = disposal.Remark;
     ddel.Cost       = disposal.Cost;
     ddel.RefNo      = disposal.RefNo;
     ddel.EurDate    = disposal.EurDate;
     ddel.RecID      = disposal.RecID;
     ddel.Save();
 }
        private static void AddlossDeleted(DataRow dataRow)
        {
            var dispdelete = new DisposalDelete();

            dispdelete.AddNew();
            dispdelete.ID       = (int)dataRow["ID"];
            dispdelete.ItemID   = (int)dataRow["ItemID"];
            dispdelete.StoreId  = (int)dataRow["StoreID"];
            dispdelete.ReasonId = (int)dataRow["ReasonID"];
            dispdelete.Quantity = (long)dataRow["Quantity"];
            dispdelete.Date     = (DateTime)dataRow["Date"];
            //dispdelete.ApprovedBy = (string) dataRow["ApprovedBy"];
            dispdelete.Losses  = (bool)dataRow["Losses"];
            dispdelete.BatchNo = (string)dataRow["BatchNo"];
            // dispdelete.Remark = (string) dataRow["Remark"];
            dispdelete.Cost    = (double)dataRow["Cost"];
            dispdelete.RefNo   = (string)dataRow["RefNo"];
            dispdelete.EurDate = (DateTime)dataRow["EurDate"];
            dispdelete.RecID   = (int)dataRow["RecID"];
            dispdelete.Save();
        }