protected void drpDLS_SelectedIndexChanged(object sender, EventArgs e) { string s_DLS = String.Empty; if (this.drpDLS.SelectedValue.Equals(String.Empty)) { s_DLS = this.drpDLS.SelectedValue; this.btnAddUser.Visible = false; this.btnBack.Visible = false; } else { // s_DLS = this.drpDLS.SelectedValue.Split('-')[5].ToString(); string[] s_dls = this.drpDLS.SelectedValue.Split('-'); if (s_dls.Length == 7) { s_DLS = s_dls[5].ToString() + "-" + s_dls[6].ToString(); } else if (s_dls.Length == 6) { s_DLS = s_dls[5].ToString(); } else { s_DLS = this.drpDLS.SelectedValue; } this.btnAddUser.Visible = true; this.btnBack.Visible = true; } DataSet ds = objAgentManageDB.GetHYZH(s_DLS); if (ds.Tables[0].Rows.Count > 0) { this.trsj.Visible = true; this.lbxj.Text = ds.Tables[0].Rows.Count.ToString(); KFB_ZHGL mo_zhgl = new KFB_ZHGL(); mo_zhgl = objAgentManageDB.GetModel(s_DLS); this.lbsj.Text = mo_zhgl.N_HYMC; this.lbm1.Text = Convert.ToString(Convert.ToDouble(objAgentManageDB.Getxyed(s_DLS)) - Convert.ToDouble(objAgentManageDB.Getsyed(s_DLS))); this.lbm2.Text = objAgentManageDB.Getsyed(s_DLS); this.trbj.Visible = false; } else { this.trsj.Visible = false; this.trbj.Visible = true; } this.grvUserManage.DataSource = ds; this.grvUserManage.DataBind(); if (Comm.GetFlag(mUserID) == "1") { btnAddUser.Visible = false; } }
/// <summary> /// 保存按鈕 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSave_Click(object sender, EventArgs e) { try { #region "修改棒球設定檔" KFB_SETUPMB mo_mb = new KFB_SETUPMB(); Hashtable GetSql = new Hashtable(); KFB_ZHGL mo_zhgl = new KFB_ZHGL(); mo_zhgl = objAgentManageDB.GetModel(this.lblName.Text.ToString().Trim()); mo_mb.N_HYZH = this.lblName.Text; mo_mb.N_RFTY = Convert.ToDecimal(this.drptyrf.Text); mo_mb.N_RFDZ = Convert.ToDecimal(this.txtdzrf.Text); mo_mb.N_RFDC = Convert.ToDecimal(this.txtdcrf.Text); mo_mb.N_DXTY = Convert.ToDecimal(this.drptydx.Text); mo_mb.N_DXDZ = Convert.ToDecimal(this.txtdzdx.Text); mo_mb.N_DXDC = Convert.ToDecimal(this.txtdcdx.Text); mo_mb.N_DYTY = Convert.ToDecimal(this.drptydy.Text); mo_mb.N_DYDZ = Convert.ToDecimal(this.txtdzdy.Text); mo_mb.N_DYDC = Convert.ToDecimal(this.txtdcdy.Text); mo_mb.N_DSTY = Convert.ToDecimal(this.drptyds.Text); mo_mb.N_DSDZ = Convert.ToDecimal(this.txtdzds.Text); mo_mb.N_DSDC = Convert.ToDecimal(this.txtdcds.Text); mo_mb.N_ZDRFTY = Convert.ToDecimal(this.drptyzdrf.Text); mo_mb.N_ZDRFDZ = Convert.ToDecimal(this.txtdzzdrf.Text); mo_mb.N_ZDRFDC = Convert.ToDecimal(this.txtdczdrf.Text); mo_mb.N_ZDDXTY = Convert.ToDecimal(this.drptyzddx.Text); mo_mb.N_ZDDXDZ = Convert.ToDecimal(this.txtdzzddx.Text); mo_mb.N_ZDDXDC = Convert.ToDecimal(this.txtdczddx.Text); mo_mb.N_SYTY = Convert.ToDecimal(this.drptysy.Text); mo_mb.N_SYDZ = Convert.ToDecimal(this.txtdzsy.Text); mo_mb.N_SYDC = Convert.ToDecimal(this.txtdcsy.Text); mo_mb.N_GGTY = Convert.ToDecimal(this.drptygg.Text); mo_mb.N_GGDZ = Convert.ToDecimal(this.txtdzgg.Text); mo_mb.N_GGDC = Convert.ToDecimal(this.txtdcgg.Text); mo_mb.N_GJTY = Convert.ToDecimal(this.drptybcrf.Text); mo_mb.N_GJDZ = Convert.ToDecimal(this.txtdzbcrf.Text); mo_mb.N_GJDC = Convert.ToDecimal(this.txtdcbcrf.Text); objAgentManageDB.UpdateMB(mo_mb, GetSql); objAgentManageDB.Update(GetSql); #endregion #region "修改下綫" string strhidvalue = this.hidvalue.Value; string strZH = ""; string strFlag = ""; DataSet getds = new DataSet(); if (strhidvalue.IndexOf(":") > -1) { //取出所有會員 if (mo_zhgl.N_HYDJ.ToString() != "9") //取得下屬帳號 { getds = objAgentManageDB.GetZH(mo_zhgl.N_HYDJ.ToString(), this.lblName.Text); if (getds.Tables[0].Rows.Count > 0) { for (int i = 0; i < getds.Tables[0].Rows.Count; i++) { strZH = strZH + strFlag + "'" + getds.Tables[0].Rows[i]["n_hyzh"].ToString() + "'"; strFlag = ","; } } } getds = objAgentManageDB.GetHYZH(mo_zhgl.N_HYDJ.ToString(), this.lblName.Text); //取得下屬會員 if (getds.Tables[0].Rows.Count > 0) { for (int i = 0; i < getds.Tables[0].Rows.Count; i++) { strZH = strZH + strFlag + "'" + getds.Tables[0].Rows[i]["n_hyzh"].ToString() + "'"; strFlag = ","; } } if (!strZH.Equals("")) { string[] strarr = strhidvalue.Split(';'); for (int i = 0; i < strarr.Length - 1; i++) { string[] strElement = strarr[i].ToString().Split(':'); string strtable = strElement[0]; string[] strvalue = strElement[1].ToString().Split(','); objAgentManageDB.Update("mb", strvalue[0].ToString(), strvalue[1].ToString(), strZH); } } } #endregion ShowMsg("修改成功!"); } catch (Exception ex) { ShowMsg("修改失敗,請通知管理員!"); } }
/// <summary> /// 保存按鈕 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSave_Click(object sender, EventArgs e) { try { #region "修改運彩設定檔" KFB_SETUPCP mo_cp = new KFB_SETUPCP(); Hashtable GetSql = new Hashtable(); KFB_ZHGL mo_zhgl = new KFB_ZHGL(); mo_zhgl = this.objAgentManageDB.GetModel(this.lblName.Text.ToString().Trim()); mo_cp.N_HYDH = this.lblName.Text; mo_cp.N_BQTY = Convert.ToDecimal(this.drptybq.Text); mo_cp.N_BQDZ = Convert.ToDecimal(this.txtdzbq.Text); mo_cp.N_BQDC = Convert.ToDecimal(this.txtdcbq.Text); mo_cp.N_LQTY = Convert.ToDecimal(this.drptylq.Text); mo_cp.N_LQDZ = Convert.ToDecimal(this.txtdzlq.Text); mo_cp.N_LQDC = Convert.ToDecimal(this.txtdclq.Text); mo_cp.N_ZQTY = Convert.ToDecimal(this.drptyzq.Text); mo_cp.N_ZQDZ = Convert.ToDecimal(this.txtdzzq.Text); mo_cp.N_ZQDC = Convert.ToDecimal(this.txtdczq.Text); mo_cp.N_GSTY = Convert.ToDecimal(this.drptygs.Text); mo_cp.N_GSDZ = Convert.ToDecimal(this.txtdzgs.Text); mo_cp.N_GSDC = Convert.ToDecimal(this.txtdcgs.Text); mo_cp.N_QZTY = Convert.ToDecimal(this.drptyqz.Text); mo_cp.N_QZDZ = Convert.ToDecimal(this.txtdzqz.Text); mo_cp.N_QZDC = Convert.ToDecimal(this.txtdcqz.Text); this.objAgentManageDB.UpdateCP(mo_cp, GetSql); objAgentManageDB.Update(GetSql); #endregion #region "修改下綫" string strhidvalue = this.hidvalue.Value; string strZH = ""; string strFlag = ""; DataSet getds = new DataSet(); if (strhidvalue.IndexOf(":") > -1) { //取出所有會員 if (mo_zhgl.N_HYDJ.ToString() != "9")//取得下屬帳號 { getds = objAgentManageDB.GetZH(mo_zhgl.N_HYDJ.ToString(), this.lblName.Text); if (getds.Tables[0].Rows.Count > 0) { for (int i = 0; i < getds.Tables[0].Rows.Count; i++) { strZH = strZH + strFlag + "'" + getds.Tables[0].Rows[i]["n_hyzh"].ToString() + "'"; strFlag = ","; } } } getds = objAgentManageDB.GetHYZH(mo_zhgl.N_HYDJ.ToString(), this.lblName.Text);//取得下屬會員 if (getds.Tables[0].Rows.Count > 0) { for (int i = 0; i < getds.Tables[0].Rows.Count; i++) { strZH = strZH + strFlag + "'" + getds.Tables[0].Rows[i]["n_hyzh"].ToString() + "'"; strFlag = ","; } } if (!strZH.Equals("")) { string[] strarr = strhidvalue.Split(';'); for (int i = 0; i < strarr.Length - 1; i++) { string[] strElement = strarr[i].ToString().Split(':'); string strtable = strElement[0]; string[] strvalue = strElement[1].ToString().Split(','); objAgentManageDB.Update("cp", strvalue[0].ToString(), strvalue[1].ToString(), strZH); } } } #endregion this.ShowMsg("修改成功!"); } catch (Exception ex) { this.ShowMsg("修改失敗,請通知管理員!"); } }
/// <summary> /// 保存按鈕 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSave_Click(object sender, EventArgs e) { try { #region "修改足球設定檔" KFB_SETUPZQ mo_zq = new KFB_SETUPZQ(); Hashtable GetSql = new Hashtable(); KFB_ZHGL mo_zhgl = new KFB_ZHGL(); mo_zhgl = objAgentManageDB.GetModel(this.lblName.Text.ToString().Trim()); mo_zq.N_HYZH = this.lblName.Text.ToString().Trim(); mo_zq.N_ARFTY = Convert.ToDecimal(this.drptyarf.Text); mo_zq.N_ADXTY = Convert.ToDecimal(this.drptyadx.Text); mo_zq.N_ADYTY = Convert.ToDecimal(this.drptyady.Text); mo_zq.N_ADSTY = Convert.ToDecimal(this.drptyads.Text); mo_zq.N_AZDRFTY = Convert.ToDecimal(this.drptyazdrf.Text); mo_zq.N_AZDDXTY = Convert.ToDecimal(this.drptyazddx.Text); mo_zq.N_ABCRFTY = Convert.ToDecimal(this.drptyabcrf.Text); mo_zq.N_ABCDXTY = Convert.ToDecimal(this.drptyabcdx.Text); mo_zq.N_ABCDYTY = Convert.ToDecimal(this.drptyabcdy.Text); mo_zq.N_ARQSTY = Convert.ToDecimal(this.drptyarqs.Text); mo_zq.N_ABDTY = Convert.ToDecimal(this.drptyabd.Text); mo_zq.N_ABQCTY = Convert.ToDecimal(this.drptyabqc.Text); mo_zq.N_AGGTY = Convert.ToDecimal(this.drptyagg.Text); mo_zq.N_AGJTY = Convert.ToDecimal(this.drptyagj.Text); mo_zq.N_BRFTY = Convert.ToDecimal(this.drptybrf.Text); mo_zq.N_BDXTY = Convert.ToDecimal(this.drptybdx.Text); mo_zq.N_BDYTY = Convert.ToDecimal(this.drptybdy.Text); mo_zq.N_BDSTY = Convert.ToDecimal(this.drptybds.Text); mo_zq.N_BZDRFTY = Convert.ToDecimal(this.drptybzdrf.Text); mo_zq.N_BZDDXTY = Convert.ToDecimal(this.drptybzddx.Text); mo_zq.N_BBCRFTY = Convert.ToDecimal(this.drptybbcrf.Text); mo_zq.N_BBCDXTY = Convert.ToDecimal(this.drptybbcdx.Text); mo_zq.N_BBCDYTY = Convert.ToDecimal(this.drptybbcdy.Text); mo_zq.N_BRQSTY = Convert.ToDecimal(this.drptybrqs.Text); mo_zq.N_BBDTY = Convert.ToDecimal(this.drptybbd.Text); mo_zq.N_BBQCTY = Convert.ToDecimal(this.drptybbqc.Text); mo_zq.N_BGGTY = Convert.ToDecimal(this.drptybgg.Text); mo_zq.N_BGJTY = Convert.ToDecimal(this.drptybgj.Text); mo_zq.N_CRFTY = Convert.ToDecimal(this.drptycrf.Text); mo_zq.N_CDXTY = Convert.ToDecimal(this.drptycdx.Text); mo_zq.N_CDYTY = Convert.ToDecimal(this.drptycdy.Text); mo_zq.N_CDSTY = Convert.ToDecimal(this.drptycds.Text); mo_zq.N_CZDRFTY = Convert.ToDecimal(this.drptyczdrf.Text); mo_zq.N_CZDDXTY = Convert.ToDecimal(this.drptyczddx.Text); mo_zq.N_CBCRFTY = Convert.ToDecimal(this.drptycbcrf.Text); mo_zq.N_CBCDXTY = Convert.ToDecimal(this.drptycbcdx.Text); mo_zq.N_CBCDYTY = Convert.ToDecimal(this.drptycbcdy.Text); mo_zq.N_CRQSTY = Convert.ToDecimal(this.drptycrqs.Text); mo_zq.N_CBDTY = Convert.ToDecimal(this.drptycbd.Text); mo_zq.N_CBQCTY = Convert.ToDecimal(this.drptycbqc.Text); mo_zq.N_CGGTY = Convert.ToDecimal(this.drptycgg.Text); mo_zq.N_CGJTY = Convert.ToDecimal(this.drptycgj.Text); mo_zq.N_RFDZ = Convert.ToDecimal(this.txtdzrf.Text); mo_zq.N_RFDC = Convert.ToDecimal(this.txtdcrf.Text); mo_zq.N_DXDZ = Convert.ToDecimal(this.txtdzdx.Text); mo_zq.N_DXDC = Convert.ToDecimal(this.txtdcdx.Text); mo_zq.N_DYDZ = Convert.ToDecimal(this.txtdzdy.Text); mo_zq.N_DYDC = Convert.ToDecimal(this.txtdcdy.Text); mo_zq.N_DSDZ = Convert.ToDecimal(this.txtdzds.Text); mo_zq.N_DSDC = Convert.ToDecimal(this.txtdcds.Text); mo_zq.N_ZDRFDZ = Convert.ToDecimal(this.txtdzzdrf.Text); mo_zq.N_ZDRFDC = Convert.ToDecimal(this.txtdczdrf.Text); mo_zq.N_ZDDXDZ = Convert.ToDecimal(this.txtdzzddx.Text); mo_zq.N_ZDDXDC = Convert.ToDecimal(this.txtdczddx.Text); mo_zq.N_BCRFDZ = Convert.ToDecimal(this.txtdzbcrf.Text); mo_zq.N_BCRFDC = Convert.ToDecimal(this.txtdcbcrf.Text); mo_zq.N_BCDXDZ = Convert.ToDecimal(this.txtdzbcdx.Text); mo_zq.N_BCDXDC = Convert.ToDecimal(this.txtdcbcdx.Text); mo_zq.N_BCDYDZ = Convert.ToDecimal(this.txtdzbcdy.Text); mo_zq.N_BCDYDC = Convert.ToDecimal(this.txtdcbcdy.Text); mo_zq.N_RQSDZ = Convert.ToDecimal(this.txtdzrqs.Text); mo_zq.N_RQSDC = Convert.ToDecimal(this.txtdcrqs.Text); mo_zq.N_BDDZ = Convert.ToDecimal(this.txtdzbd.Text); mo_zq.N_BDDC = Convert.ToDecimal(this.txtdcbd.Text); mo_zq.N_BQCDZ = Convert.ToDecimal(this.txtdzbqc.Text); mo_zq.N_BQCDC = Convert.ToDecimal(this.txtdcbqc.Text); mo_zq.N_GGDZ = Convert.ToDecimal(this.txtdzgg.Text); mo_zq.N_GGDC = Convert.ToDecimal(this.txtdcgg.Text); mo_zq.N_GJDZ = Convert.ToDecimal(this.txtdzgj.Text); mo_zq.N_GJDC = Convert.ToDecimal(this.txtdcgj.Text); objAgentManageDB.UpdateZQ(mo_zq, GetSql); objAgentManageDB.Update(GetSql); #endregion #region "修改下綫" string strhidvalue = this.hidvalue.Value; string strZH = ""; string strFlag = ""; DataSet getds = new DataSet(); if (strhidvalue.IndexOf(":") > -1) { //取出所有會員 if (mo_zhgl.N_HYDJ.ToString() != "9") //取得下屬帳號 { getds = objAgentManageDB.GetZH(mo_zhgl.N_HYDJ.ToString(), this.lblName.Text); if (getds.Tables[0].Rows.Count > 0) { for (int i = 0; i < getds.Tables[0].Rows.Count; i++) { strZH = strZH + strFlag + "'" + getds.Tables[0].Rows[i]["n_hyzh"].ToString() + "'"; strFlag = ","; } } } getds = objAgentManageDB.GetHYZH(mo_zhgl.N_HYDJ.ToString(), this.lblName.Text); //取得下屬會員 if (getds.Tables[0].Rows.Count > 0) { for (int i = 0; i < getds.Tables[0].Rows.Count; i++) { strZH = strZH + strFlag + "'" + getds.Tables[0].Rows[i]["n_hyzh"].ToString() + "'"; strFlag = ","; } } if (!strZH.Equals("")) { string[] strarr = strhidvalue.Split(';'); for (int i = 0; i < strarr.Length - 1; i++) { string[] strElement = strarr[i].ToString().Split(':'); string strtable = strElement[0]; string[] strvalue = strElement[1].ToString().Split(','); objAgentManageDB.Update("zq", strvalue[0].ToString(), strvalue[1].ToString(), strZH); } } } #endregion ShowMsg("修改成功!"); } catch (Exception ex) { ShowMsg("修改失敗,請通知管理員!"); } }