Example #1
0
        private void ShowInfo(int _id)
        {
            BLL.CheckRecord   bll   = new BLL.CheckRecord();
            Model.CheckRecord model = bll.GetModel(_id);

            ddlCustomer.SelectedValue = model.CustomerId.ToString();
            GoodsBind(model.CustomerId);
            ddlGoods.SelectedValue        = model.GoodsId.ToString();
            ddlVehicle.SelectedValue      = model.VehicleId.ToString();
            ddlHandlingMode.SelectedValue = model.HandlingModeId.ToString();
            txtCheckTime.Text             = model.CheckTime.ToString("yyyy-MM-dd");
            txtInspectionNumber.Text      = model.InspectionNumber;
            txtCaseNumber.Text            = model.CaseNumber;
            txtCheckResult.Text           = model.CheckResult;
            txtRealName.Text = model.RealName;
            txtLinkTel.Text  = model.LinkTel;
            txtAdmin.Text    = model.Admin;
            txtRemark.Text   = model.Remark;

            BLL.CheckCost checkCostBLL = new BLL.CheckCost();
            DataTable     checkCostDT  = checkCostBLL.GetList(" CheckRecordId = " + _id + "").Tables[0];

            this.rptCostList.DataSource = checkCostDT;
            this.rptCostList.DataBind();
        }
Example #2
0
        private bool DoEdit(int _id)
        {
            bool result = false;
            BLL.CheckCost bll = new BLL.CheckCost();
            Model.CheckCost 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;
        }
        private bool DoEdit(int _id)
        {
            bool result = false;

            BLL.CheckCost   bll   = new BLL.CheckCost();
            Model.CheckCost 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);
        }
        private void ShowInfo(int _id)
        {
            BLL.CheckCost   bll   = new BLL.CheckCost();
            Model.CheckCost model = bll.GetModelById(_id);

            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;
        }
        private void RptBind(string _strWhere, string _goodsby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            this.ddlType.SelectedValue   = this.type.ToString();
            this.ddlStatus.SelectedValue = this.status.ToString();
            txtKeyWord.Text   = this.keyword;
            txtBeginTime.Text = this.beginTime;
            txtEndTime.Text   = this.endTime;
            BLL.CheckCost bll = new BLL.CheckCost();
            this.rptList.DataSource = bll.GetSearchList(this.pageSize, this.page, _strWhere, _goodsby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("check_cost_list.aspx", "storein_order_id={0}&type={1}&status={2}&keyword={3}&beginTime={4}&endTime={5}&page={6}",
                                              this.storein_order_id.ToString(), this.type.ToString(), this.status.ToString(), this.keyword.ToString(), this.beginTime.ToString(), this.endTime, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Example #6
0
 private void ShowInfo(int _id)
 {
     BLL.CheckCost bll = new BLL.CheckCost();
     model = bll.GetModelById(_id);
 }
Example #7
0
        private void ShowInfo(int _id)
        {
            BLL.CheckCost bll = new BLL.CheckCost();
            Model.CheckCost model = bll.GetModelById(_id);

            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;
        }
 private void RptBind(string _strWhere, string _orderby)
 {
     BLL.CheckCost bll = new BLL.CheckCost();
     this.rptList.DataSource = bll.GetList(0, _strWhere, _orderby);
     this.rptList.DataBind();
 }
Example #9
0
        private void RptBind(string _strWhere, string _goodsby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            this.ddlType.SelectedValue = this.type.ToString();
            this.ddlStatus.SelectedValue = this.status.ToString();
            txtKeyWord.Text = this.keyword;
            txtBeginTime.Text = this.beginTime;
            txtEndTime.Text = this.endTime;
            BLL.CheckCost bll = new BLL.CheckCost();
            this.rptList.DataSource = bll.GetSearchList(this.pageSize, this.page, _strWhere, _goodsby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("check_cost_list.aspx", "storein_order_id={0}&type={1}&status={2}&keyword={3}&beginTime={4}&endTime={5}&page={6}",
                this.storein_order_id.ToString(), this.type.ToString(), this.status.ToString(), this.keyword.ToString(), this.beginTime.ToString(), this.endTime, "__id__");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
 private void ShowInfo(int _id)
 {
     BLL.CheckCost bll = new BLL.CheckCost();
     model = bll.GetModelById(_id);
 }
Example #11
0
        private void ShowInfo(int _id)
        {
            BLL.CheckRecord bll = new BLL.CheckRecord();
            Model.CheckRecord model = bll.GetModel(_id);

            ddlCustomer.SelectedValue = model.CustomerId.ToString();
            GoodsBind(model.CustomerId);
            ddlGoods.SelectedValue = model.GoodsId.ToString();
            ddlVehicle.SelectedValue = model.VehicleId.ToString();
            ddlHandlingMode.SelectedValue = model.HandlingModeId.ToString();
            txtCheckTime.Text = model.CheckTime.ToString("yyyy-MM-dd");
            txtInspectionNumber.Text = model.InspectionNumber;
            txtCaseNumber.Text = model.CaseNumber;
            txtCheckResult.Text = model.CheckResult;
            txtRealName.Text = model.RealName;
            txtLinkTel.Text = model.LinkTel;
            txtAdmin.Text = model.Admin;
            txtRemark.Text = model.Remark;

            BLL.CheckCost checkCostBLL = new BLL.CheckCost();
            DataTable checkCostDT = checkCostBLL.GetList(" CheckRecordId = " + _id + "").Tables[0];
            this.rptCostList.DataSource = checkCostDT;
            this.rptCostList.DataBind();
        }
Example #12
0
 private void RptBind(string _strWhere, string _orderby)
 {
     BLL.CheckCost bll = new BLL.CheckCost();
     this.rptList.DataSource = bll.GetList(0, _strWhere, _orderby);
     this.rptList.DataBind();
 }