/// <summary> /// 事件提交 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtn_Submit_Click(object sender, EventArgs e) { EyouSoft.BLL.FinanceStructure.TourProfitSharer bll = new EyouSoft.BLL.FinanceStructure.TourProfitSharer(SiteUserInfo); EyouSoft.Model.FinanceStructure.TourProfitShareInfo model = null; if (Utils.GetInt(Request.QueryString["id"]) > 0) { model = bll.GetModel(Utils.GetQueryStringValue("id")); } else { model = new EyouSoft.Model.FinanceStructure.TourProfitShareInfo(); } model.CompanyId = CurrentUserCompanyID; model.CreateTime = DateTime.Now; model.DepartmentId = Utils.GetInt(UCSelectDepartment1.GetDepartId); model.DepartmentName = UCSelectDepartment1.GetDepartmentName; model.Remark = EyouSoft.Common.Utils.GetFormValue("txt_Remarks"); model.OperatorId = SiteUserInfo.ID; model.SaleId = EyouSoft.Common.Utils.GetInt(selectOperator1.OperId); model.Saler = selectOperator1.OperName; model.ShareCost = EyouSoft.Common.Utils.GetDecimal(txt_IncomeMoney.Text); model.ShareItem = txt_Income.Text; model.TourId = Request.QueryString["tourId"]; if (bll.AddTourShare(model) > 0) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, "javascript:alert('添加成功!');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();parent.window.location.reload();"); } else { EyouSoft.Common.Function.MessageBox.ResponseScript(this, "javascript:alert('添加失败!');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();parent.window.location.reload();"); } }
/// <summary> /// 绑定信息 /// </summary> /// <param name="id"></param> void BindInfo(string id) { EyouSoft.BLL.FinanceStructure.TourProfitSharer bll = new EyouSoft.BLL.FinanceStructure.TourProfitSharer(SiteUserInfo); EyouSoft.Model.FinanceStructure.TourProfitShareInfo model = bll.GetModel(id); if (model != null) { txt_Income.Text = model.ShareItem; txt_IncomeMoney.Text = model.ShareCost.ToString(); txt_Remarks.Value = model.Remark; UCSelectDepartment1.GetDepartId = model.DepartmentId.ToString(); UCSelectDepartment1.GetDepartmentName = model.DepartmentName; selectOperator1.OperId = model.SaleId.ToString(); selectOperator1.OperName = model.Saler; } }