Exemplo n.º 1
0
 /// <summary>
 /// 添加费用类别
 /// </summary>
 /// <param name="ID">实体主键</param>
 /// <returns></returns>
 public void Delete(string ID)
 {
     BeijianInputInfo cInfo = new BeijianInputInfo(ID);
     dal.Delete(cInfo);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 添加费用类别
 /// </summary>
 /// <param name="cInfo">实体</param>
 /// <returns>新增实体的主键</returns>
 public string Add(BeijianInputInfo cInfo)
 {
     return dal.Add(cInfo);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 更新费用类别
 /// </summary>
 /// <param name="cInfo">实体</param>
 public void Update(BeijianInputInfo cInfo)
 {
     if (string.IsNullOrEmpty(cInfo.ID))
     {
         throw new ArgumentNullException("参数ID不能为空。");
     }
     dal.Update(cInfo);
 }
Exemplo n.º 4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string id = this.ReportID;
                BeijianInputInfo wInfo = new BeijianInputInfo();
                if (string.IsNullOrEmpty(id) == false)
                {
                    wInfo = new BeijianInput().GetByID(id);
                }

                wInfo.UsageType = rblUsage.SelectedValue;
                wInfo.ReportTypeID = rblReportType.SelectedValue;
                wInfo.InputUserID = this.UserCacheInfo.ID;
                wInfo.ShipID = ddlShip.SelectedValue;
                string year = ddlReportYear.SelectedValue;
                string month = ddlReportMonth.SelectedValue;
                string dimTimeID = new DimTime().GetIDByMonth(year, month);
                wInfo.DimTimeID = dimTimeID;
                wInfo.CurrencyID = ddlCurrency.SelectedValue;
                wInfo.ExchangeRateID = this.RateID;

                wInfo.电器 = tb电器.Text;
                wInfo.分油机 = tb分油机.Text;
                wInfo.辅机 = tb辅机.Text;
                wInfo.副机 = tb副机.Text;
                wInfo.舾装 = tb舾装.Text;
                wInfo.主机 = tb主机.Text;
                if (string.IsNullOrEmpty(id) == true)
                {
                    this.ReportID = new BeijianInput().Add(wInfo);
                }
                else
                {
                    new BeijianInput().Update(wInfo);
                }
                tb总数.Text = wInfo.总数;
                ShowMsg("物料报表保存成功。");
            }
            catch (ArgumentNullException aex)
            {
                ShowMsg(aex.Message);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message);
                Log(ex);
            }
        }