protected void btnSave_Click(object sender, EventArgs e) { if (ddl_Quarter.SelectedValue == "0") { MessageBox.Show(this, "请选择季度!"); return; } FNA_StaffBounsLevelBLL bll = new FNA_StaffBounsLevelBLL(); if (ViewState["ID"] != null) { bll = new FNA_StaffBounsLevelBLL((int)ViewState["ID"]); } bll.Model.Quarter = int.Parse(ddl_Quarter.SelectedValue); AC_AccountQuarterBLL quarter = new AC_AccountQuarterBLL(bll.Model.Quarter); bll.Model.BegainMonth = quarter.Model.BeginMonth; bll.Model.EndMonth = quarter.Model.EndMonth; bll.Model.Level = int.Parse(ddl_level.SelectedValue); bll.Model.OrganizeCity = int.Parse(tr_OrganizeCity.SelectValue); bll.Model.SalesVolume1 = decimal.Parse(txt_sales1.Text.Trim()) * 10000; bll.Model.SalesVolume2 = decimal.Parse(txt_sales2.Text.Trim()) * 10000; bll.Model.Bouns = decimal.Parse(txt_BounsBase.Text.Trim()); if (ViewState["ID"] != null) { bll.Update(); } else { bll.Add(); } ViewState["ID"] = null; BindGrid(); }
protected void btnSave_Click(object sender, EventArgs e) { if (ddl_Quarter.SelectedValue == "0") { MessageBox.Show(this, "请选择季度!"); return; } FNA_StaffBounsLevelBLL bll = new FNA_StaffBounsLevelBLL(); if (ViewState["ID"] != null) { bll = new FNA_StaffBounsLevelBLL((int)ViewState["ID"]); } bll.Model.Quarter = int.Parse(ddl_Quarter.SelectedValue); AC_AccountQuarterBLL quarter = new AC_AccountQuarterBLL(bll.Model.Quarter); bll.Model.BegainMonth = quarter.Model.BeginMonth; bll.Model.EndMonth = quarter.Model.EndMonth; bll.Model.Level = int.Parse(ddl_level.SelectedValue); bll.Model.OrganizeCity = int.Parse(tr_OrganizeCity.SelectValue); bll.Model.SalesVolume1 = decimal.Parse(txt_sales1.Text.Trim())*10000; bll.Model.SalesVolume2 = decimal.Parse(txt_sales2.Text.Trim())*10000; bll.Model.Bouns = decimal.Parse(txt_BounsBase.Text.Trim()); if (ViewState["ID"] != null) { bll.Update(); } else { bll.Add(); } ViewState["ID"] = null; BindGrid(); }
private void BindGrid() { gv_List.DataSource = FNA_StaffBounsLevelBLL.GetData(int.Parse(ddl_Quarter.SelectedValue)); gv_List.BindGrid(); approveflag = FNA_StaffBounsLevelBLL.GetApproveState(int.Parse(ddl_Quarter.SelectedValue)); bt_Submit.Visible = !(approveflag == 1); lb_ApproveFlag.Text = approveflag == 1 ? "已审核" : (approveflag == 4 ? "已提交" : "未审核"); div_header.InnerText = ddl_Quarter.SelectedItem.Text + "全国办事处绩效考核明细表"; MatrixTable.GridViewMatric(gv_List); MatrixTable.GridViewMergSampeValueRow(gv_List, 0); }
protected void gvList_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { int id = int.Parse(gvList.DataKeys[e.NewSelectedIndex][0].ToString()); FNA_StaffBounsLevelBLL bll = new FNA_StaffBounsLevelBLL(id); ddl_level.SelectedValue = bll.Model.Level.ToString(); txt_sales1.Text =( bll.Model.SalesVolume1/10000).ToString(); txt_sales2.Text =( bll.Model.SalesVolume2/10000).ToString(); txt_BounsBase.Text = bll.Model.Bouns.ToString(); tr_OrganizeCity.SelectValue = bll.Model.OrganizeCity.ToString(); ViewState["ID"] = id; }
protected void gvList_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { int id = int.Parse(gvList.DataKeys[e.NewSelectedIndex][0].ToString()); FNA_StaffBounsLevelBLL bll = new FNA_StaffBounsLevelBLL(id); ddl_level.SelectedValue = bll.Model.Level.ToString(); txt_sales1.Text = (bll.Model.SalesVolume1 / 10000).ToString(); txt_sales2.Text = (bll.Model.SalesVolume2 / 10000).ToString(); txt_BounsBase.Text = bll.Model.Bouns.ToString(); tr_OrganizeCity.SelectValue = bll.Model.OrganizeCity.ToString(); ViewState["ID"] = id; }
protected void bt_Submit_Click(object sender, EventArgs e) { approveflag = FNA_StaffBounsLevelBLL.GetApproveState(int.Parse(ddl_Quarter.SelectedValue)); if (approveflag == 1 || approveflag == 3) { MessageBox.Show(this, "该绩效已审核或已提交,无法再次发起申请"); return; } NameValueCollection dataobjects = new NameValueCollection(); dataobjects.Add("Quarter", ViewState["Quarter"].ToString()); int TaskID = EWF_TaskBLL.NewTask("Revocation_Staff", (int)Session["UserID"], new AC_AccountQuarterBLL((int)ViewState["Quarter"]).Model.Name + " 办事处主管绩效考核" , "~/SubModule/StaffManage/StaffDetail.aspx?ID=" + ViewState["ID"].ToString(), dataobjects); if (TaskID > 0) { FNA_StaffBounsLevelBLL.ChageApproveState((int)ViewState["Quarter"], 4); } Response.Redirect("~/SubModule/EWF/Apply.aspx?TaskID=" + TaskID.ToString()); }