private void ShowInfo(int _id) { BLL.StoreOutOrder bll = new BLL.StoreOutOrder(); Model.StoreOutOrder model = bll.GetModel(_id); ddlStoreInOrder.SelectedValue = model.StoreInOrderId.ToString(); hidReceivedBeginTime.Value = model.BeginChargingTime.ToString(); hidReceivedEndTime.Value = model.EndChargingTime.ToString(); txtUnitPriceDetails.Text = model.UnitPriceDetails; hidCustomerId.Value = model.CustomerId.ToString(); labCustomerName.Text = GetCustomerName(model.CustomerId); txtChargingCount.Text = model.Count.ToString("0.00"); txtTotalMoney.Text = model.TotalMoney.ToString("0.00"); txtInvoiceMoney.Text = model.InvoiceMoney.ToString("0.00"); txtStoredOutTime.Text = model.StoredOutTime.HasValue ? model.StoredOutTime.Value.ToString("yyyy-MM-dd") : ""; txtAdmin.Text = model.Admin; txtRemark.Text = model.Remark; BLL.StoreOutCost costBLL = new BLL.StoreOutCost(); DataTable costDT = costBLL.GetList(" StoreOutOrderId = " + _id + "").Tables[0]; this.rptCostList.DataSource = costDT; this.rptCostList.DataBind(); BLL.StoreOutGoods goodsBLL = new BLL.StoreOutGoods(); DataTable goodsDT = goodsBLL.GetList(" and A.StoreOutOrderId = " + _id + " ").Tables[0]; this.rptGoodsList.DataSource = goodsDT; this.rptGoodsList.DataBind(); }
private bool DoEdit(int _id) { bool result = false; BLL.StoreOutCost bll = new BLL.StoreOutCost(); Model.StoreOutCost model = bll.GetModelById(_id); model.Name = txtName.Text; model.Customer = txtCustomer.Text; model.TotalPrice = ddlType.SelectedValue.Equals("-") ? Convert.ToDecimal(txtTotalPrice.Text) * -1 : Convert.ToDecimal(txtTotalPrice.Text) * 1; 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.StoreOutCost bll = new BLL.StoreOutCost(); Model.StoreOutCost 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); 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.StoreOutCost bll = new BLL.StoreOutCost(); 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("storeout_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 _orderby) { BLL.StoreOutCost bll = new BLL.StoreOutCost(); this.rptList.DataSource = bll.GetList(0, _strWhere, _orderby); this.rptList.DataBind(); }
private void ShowInfo(int _id) { BLL.StoreOutCost bll = new BLL.StoreOutCost(); model = bll.GetModelById(_id); }