private void dgCompany_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { try { string strFillFee = ((TextBox)e.Item.Cells[7].Controls[0]).Text; if (strFillFee.Trim().Length == 0) { Popup("请输入正确充值金额,如:22"); return; } if (!IsNumeric(strFillFee)) { Popup("请输入正确充值金额,如:22"); return; } Dept curDept = Session[ConstValue.LOGIN_DEPT_SESSION] as Dept; Oper curOper = Session[ConstValue.LOGIN_USER_SESSION] as Oper; BusiLog busiLog = new BusiLog(); busiLog.cndOperDate = DateTime.Now; busiLog.cnnSerial = Guid.NewGuid(); busiLog.cnvcOperName = curOper.cnvcOperName; busiLog.cnvcComments = "充值:" + e.Item.Cells[1].Text + "|" + strFillFee; busiLog.cnvcDeptID = curDept.cnvcDeptID; busiLog.cnvcDeptName = curDept.cnvcDeptName; busiLog.cnvcOperType = "BS012"; busiLog.cnvcSource = "网站"; FillFee fee = new FillFee(); fee.cndOperDate = busiLog.cndOperDate; fee.cnnFillFee = Decimal.Parse(strFillFee); fee.cnnSerial = busiLog.cnnSerial; Guid guidAcctID = new Guid(e.Item.Cells[2].Text); fee.cnvcAcctID = guidAcctID; Guid guidCompanyID = new Guid(e.Item.Cells[0].Text); fee.cnvcCompanyID = guidCompanyID; fee.cnvcCompanyName = e.Item.Cells[1].Text; fee.cnvcDeptID = e.Item.Cells[5].Text; fee.cnvcDeptName = e.Item.Cells[6].Text; fee.cnvcOperName = busiLog.cnvcOperName; PrepayFeeFacade.AddFee(fee, busiLog); this.dgCompany.EditItemIndex = -1; this.BindCompany(); Popup("充值成功!"); } catch (System.Exception ex) { Popup(ex.Message); } }
private void AddCompany() { MebCompanyPrepay company = new MebCompanyPrepay(); company.cnnPrepayFee = Decimal.Parse(txtPrepayFee.Text); company.cnvcAcctID = Guid.NewGuid(); company.cnvcCompanyID = Guid.NewGuid(); company.cnvcCompanyName = txtCompanyName.Text; company.cnvcDeptID = ddlDept.SelectedValue; company.cnvcDeptName = ddlDept.SelectedItem.Text; company.cnbValidate = chkValidate.Checked; Dept curDept = Session[ConstValue.LOGIN_DEPT_SESSION] as Dept; Oper curOper = Session[ConstValue.LOGIN_USER_SESSION] as Oper; BusiLog busiLog = new BusiLog(); busiLog.cndOperDate = DateTime.Now; busiLog.cnnSerial = Guid.NewGuid(); busiLog.cnvcOperName = curOper.cnvcOperName; busiLog.cnvcComments = "添加单位:" + txtCompanyName.Text; busiLog.cnvcDeptID = curDept.cnvcDeptID; busiLog.cnvcDeptName = curDept.cnvcDeptName; busiLog.cnvcOperType = "BS011"; busiLog.cnvcSource = "网站"; FillFee fee = new FillFee(); fee.cndOperDate = busiLog.cndOperDate; fee.cnnFillFee = company.cnnPrepayFee; fee.cnvcAcctID = company.cnvcAcctID; fee.cnvcCompanyID = company.cnvcCompanyID; fee.cnvcCompanyName = company.cnvcCompanyName; fee.cnvcDeptID = company.cnvcDeptID; fee.cnvcDeptName = company.cnvcDeptName; fee.cnnSerial = busiLog.cnnSerial; fee.cnvcOperName = busiLog.cnvcOperName; PrepayFeeFacade.AddCompany(company, fee, busiLog); }
private void UpdateCompany() { MebCompanyPrepay company = new MebCompanyPrepay(); Guid cid = new Guid(this.txtCompanyID.Text); company.cnvcCompanyID = cid; company.cnvcCompanyName = txtCompanyName.Text; company.cnbValidate = chkValidate.Checked; Dept curDept = Session[ConstValue.LOGIN_DEPT_SESSION] as Dept; Oper curOper = Session[ConstValue.LOGIN_USER_SESSION] as Oper; BusiLog busiLog = new BusiLog(); busiLog.cndOperDate = DateTime.Now; busiLog.cnnSerial = Guid.NewGuid(); busiLog.cnvcOperName = curOper.cnvcOperName; busiLog.cnvcComments = "修改单位:" + txtCompanyName.Text; busiLog.cnvcDeptID = curDept.cnvcDeptID; busiLog.cnvcDeptName = curDept.cnvcDeptName; busiLog.cnvcOperType = "BS012"; busiLog.cnvcSource = "网站"; // FillFee fee = new FillFee(); // fee.cndOperDate = busiLog.cndOperDate; // fee.cnnFillFee = company.cnnPrepayFee; // fee.cnvcAcctID = company.cnvcAcctID; // fee.cnvcCompanyID = company.cnvcCompanyID; // fee.cnvcCompanyName = company.cnvcCompanyName; // fee.cnvcDeptID = company.cnvcDeptID; // fee.cnvcDeptName = company.cnvcDeptName; // fee.cnnSerial = busiLog.cnnSerial; // fee.cnvcOperName = busiLog.cnvcOperName; PrepayFeeFacade.UpdateCompany(company, busiLog); }