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

            ddlCustomer.SelectedValue = model.CustomerId.ToString();
            txtAccountNumber.Text     = model.AccountNumber;
            txtInspectionNumber.Text  = model.InspectionNumber;
            txtBeginChargingTime.Text = model.BeginChargingTime.ToString("yyyy-MM-dd");
            txtChargingCount.Text     = model.ChargingCount.ToString();
            txtSuttleWeight.Text      = model.SuttleWeight.ToString("0.00");
            txtAdmin.Text             = model.Admin;
            txtRemark.Text            = model.Remark;

            BLL.StoreInUnitPrice unitpriceBLL = new BLL.StoreInUnitPrice();
            DataTable            unitpriceDT  = unitpriceBLL.GetList(" StoreInOrderId = " + _id + "").Tables[0];

            this.rptUnitPriceList.DataSource = unitpriceDT;
            this.rptUnitPriceList.DataBind();

            BLL.StoreInCost costBLL = new BLL.StoreInCost();
            DataTable       costDT  = costBLL.GetList(" StoreInOrderId = " + _id + "").Tables[0];

            this.rptCostList.DataSource = costDT;
            this.rptCostList.DataBind();

            BLL.StoreInGoods goodsBLL = new BLL.StoreInGoods();
            DataTable        goodsDT  = goodsBLL.GetList(" and A.StoreInOrderId = " + _id + " ").Tables[0];

            this.rptGoodsList.DataSource = goodsDT;
            this.rptGoodsList.DataBind();
        }
        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;
        }
Exemple #3
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);
        }
Exemple #4
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;
        }
Exemple #5
0
        private void RptBind(string _strWhere, string _goodsby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            if (this.storein_order_id > 0)
            {
                this.ddlStoreInOrder.SelectedValue = this.storein_order_id.ToString();
            }
            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.StoreInCost bll = new BLL.StoreInCost();
            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("storein_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 RptBind(string _strWhere, string _goodsby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            if (this.storein_order_id > 0)
            {
                this.ddlStoreInOrder.SelectedValue = this.storein_order_id.ToString();
            }
            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.StoreInCost bll = new BLL.StoreInCost();
            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("storein_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.StoreInOrder bll = new BLL.StoreInOrder();
            Model.StoreInOrder model = bll.GetModel(_id);

            ddlCustomer.SelectedValue = model.CustomerId.ToString();
            txtAccountNumber.Text = model.AccountNumber;
            txtInspectionNumber.Text = model.InspectionNumber;
            txtBeginChargingTime.Text = model.BeginChargingTime.ToString("yyyy-MM-dd");
            txtChargingCount.Text = model.ChargingCount.ToString();
            txtSuttleWeight.Text = model.SuttleWeight.ToString("0.00");
            txtAdmin.Text = model.Admin;
            txtRemark.Text = model.Remark;

            BLL.StoreInUnitPrice unitpriceBLL = new BLL.StoreInUnitPrice();
            DataTable unitpriceDT = unitpriceBLL.GetList(" StoreInOrderId = " + _id + "").Tables[0];
            this.rptUnitPriceList.DataSource = unitpriceDT;
            this.rptUnitPriceList.DataBind();

            BLL.StoreInCost costBLL = new BLL.StoreInCost();
            DataTable costDT = costBLL.GetList(" StoreInOrderId = " + _id + "").Tables[0];
            this.rptCostList.DataSource = costDT;
            this.rptCostList.DataBind();

            BLL.StoreInGoods goodsBLL = new BLL.StoreInGoods();
            DataTable goodsDT = goodsBLL.GetList(" and A.StoreInOrderId = " + _id + " ").Tables[0];
            this.rptGoodsList.DataSource = goodsDT;
            this.rptGoodsList.DataBind();
        }
        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;
        }
Exemple #9
0
 private void ShowInfo(int _id)
 {
     BLL.StoreInCost bll = new BLL.StoreInCost();
     model = bll.GetModelById(_id);
 }
 private void RptBind(string _strWhere, string _orderby)
 {
     BLL.StoreInCost bll = new BLL.StoreInCost();
     this.rptList.DataSource = bll.GetList(0, _strWhere, _orderby);
     this.rptList.DataBind();
 }
 private void RptBind(string _strWhere, string _orderby)
 {
     BLL.StoreInCost bll = new BLL.StoreInCost();
     this.rptList.DataSource = bll.GetList(0, _strWhere, _orderby);
     this.rptList.DataBind();
 }
 private void ShowInfo(int _id)
 {
     BLL.StoreInCost bll = new BLL.StoreInCost();
     model = bll.GetModelById(_id);
 }