Exemplo n.º 1
0
        private bool DoEdit(int _id)
        {
            bool result = false;

            BLL.StoreInCost   bll   = new BLL.StoreInCost();
            Model.StoreInCost model = bll.GetModelById(_id);

            model.Name       = txtName.Text;
            model.TotalPrice = ddlType.SelectedValue.Equals("-") ? Convert.ToDecimal(txtTotalPrice.Text) * -1 : Convert.ToDecimal(txtTotalPrice.Text) * 1;
            model.Customer   = txtCustomer.Text;
            model.Status     = rblStatus.Checked ? 1 : 0;
            if (!string.IsNullOrWhiteSpace(txtPaidTime.Text))
            {
                model.PaidTime = Convert.ToDateTime(txtPaidTime.Text);
            }
            model.HasBeenInvoiced = rblHasBeenInvoiced.Checked;
            if (!string.IsNullOrWhiteSpace(txtInvoicedTime.Text))
            {
                model.InvoicedTime = Convert.ToDateTime(txtInvoicedTime.Text);
            }
            model.InvoicedOperator = txtInvoicedOperator.Text;
            model.Admin            = txtAdmin.Text;
            model.Remark           = txtRemark.Text;

            if (bll.Update(model, _id))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改入库费用信息:" + model.Name); //记录日志
                result = true;
            }
            return(result);
        }
Exemplo n.º 2
0
        private void ShowInfo(int _id)
        {
            BLL.StoreInCost   bll   = new BLL.StoreInCost();
            Model.StoreInCost model = bll.GetModelById(_id);

            labAccountNumber.Text      = GetAccountNumber(model.StoreInOrderId);
            txtCustomer.Text           = model.Customer;
            labCount.Text              = model.Count.ToString();
            ddlType.SelectedValue      = model.TotalPrice >= 0 ? "+" : "-";
            txtTotalPrice.Text         = Math.Abs(model.TotalPrice).ToString();
            txtName.Text               = model.Name;
            rblStatus.Checked          = model.Status == 1;
            txtPaidTime.Text           = model.PaidTime.HasValue ? model.PaidTime.Value.ToString("yyyy-MM-dd") : "";
            rblHasBeenInvoiced.Checked = model.HasBeenInvoiced;
            txtInvoicedTime.Text       = model.InvoicedTime.HasValue ? model.InvoicedTime.Value.ToString("yyyy-MM-dd") : "";
            txtInvoicedOperator.Text   = model.InvoicedOperator;
            txtAdmin.Text              = model.Admin;
            txtRemark.Text             = model.Remark;
        }
Exemplo n.º 3
0
 private void ShowInfo(int _id)
 {
     BLL.StoreInCost bll = new BLL.StoreInCost();
     model = bll.GetModelById(_id);
 }
 private void ShowInfo(int _id)
 {
     BLL.StoreInCost bll = new BLL.StoreInCost();
     model = bll.GetModelById(_id);
 }