コード例 #1
0
        public DataSet SaveDayEnd(DataTable eayEndTable)
        {
            DownBusinessSystemsDailyBalanceDao dao = new DownBusinessSystemsDailyBalanceDao();
            DataTable unitList = dao.GetUnitProduct();
            DataSet   ds       = this.GenerateEmptyTables();

            foreach (DataRow row in eayEndTable.Rows)
            {
                DataRow[] unitRow   = unitList.Select(string.Format("unit_list_code='{0}'", row["BRAND_N"].ToString().Trim()));
                DataRow   masterrow = ds.Tables["WMS_BUSINESS_SYSTEMS_DAILY_BALANCE"].NewRow();
                //masterrow["id"] = row["DailyBalanceID"].ToString().Trim();
                masterrow["settle_date"]     = row["SettleDate"].ToString().Trim();
                masterrow["warehouse_code"]  = row["WarehouseCode"].ToString().Trim();
                masterrow["product_code"]    = row["BRAND_N"].ToString().Trim();
                masterrow["unit_code"]       = unitRow[0]["unit_code04"].ToString();
                masterrow["beginning"]       = Convert.ToDecimal(row["Beginning"]);
                masterrow["entry_amount"]    = Convert.ToDecimal(row["EntryAmount"]);
                masterrow["delivery_amount"] = Convert.ToDecimal(row["DeliveryAmount"]);
                masterrow["profit_amount"]   = Convert.ToDecimal(row["ProfitAmount"]);
                masterrow["loss_amount"]     = Convert.ToDecimal(row["LossAmount"]);
                masterrow["ending"]          = Convert.ToDecimal(row["Ending"]);
                ds.Tables["WMS_BUSINESS_SYSTEMS_DAILY_BALANCE"].Rows.Add(masterrow);
            }
            return(ds);
        }
コード例 #2
0
 public void DeleteDayEnd(string SettleDate)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         DownBusinessSystemsDailyBalanceDao dao = new DownBusinessSystemsDailyBalanceDao();
         dao.Delete(SettleDate);
     }
 }
コード例 #3
0
 /// <summary>
 /// 读取下载日结信息
 /// </summary>
 /// <returns></returns>
 public DataTable GetDayEndInfo(string parameter)
 {
     using (PersistentManager dbPm = new PersistentManager("YXConnection"))
     {
         DownBusinessSystemsDailyBalanceDao dao = new DownBusinessSystemsDailyBalanceDao();
         dao.SetPersistentManager(dbPm);
         return(dao.FindDayEnd(parameter));
     }
 }
コード例 #4
0
 public void Insert(DataSet dispatchDs)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         DownBusinessSystemsDailyBalanceDao dao = new DownBusinessSystemsDailyBalanceDao();
         if (dispatchDs.Tables["WMS_BUSINESS_SYSTEMS_DAILY_BALANCE"].Rows.Count > 0)
         {
             dao.InsertDayEnd(dispatchDs);
         }
     }
 }