Exemple #1
0
    protected void grvUser_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        string grvhidNO       = ((HiddenField)this.grvUser.Rows[e.RowIndex].FindControl("grvhidNO")).Value.Trim();
        string grvtxtName     = ((TextBox)this.grvUser.Rows[e.RowIndex].FindControl("grvtxtName")).Text;
        string grvtxtPassword = ((TextBox)this.grvUser.Rows[e.RowIndex].FindControl("grvtxtPassword")).Text.ToUpper();
        string grvltxtName_CN = ((TextBox)this.grvUser.Rows[e.RowIndex].FindControl("grvltxtName_CN")).Text.Trim();
        string grvdrpType     = ((DropDownList)this.grvUser.Rows[e.RowIndex].FindControl("grvdrpType")).SelectedValue;
        string strMD5         = FormsAuthPasswordFormat.MD5.ToString();

        string   strMd5     = FormsAuthentication.HashPasswordForStoringInConfigFile(grvtxtPassword, strMD5).ToUpper();
        KFB_ZHGL o_KFB_ZHGL = new KFB_ZHGL();

        o_KFB_ZHGL.N_HYZH   = grvhidNO;
        o_KFB_ZHGL.N_HYMM   = strMd5;
        o_KFB_ZHGL.N_HYMC   = grvltxtName_CN;
        o_KFB_ZHGL.N_HYDJ   = Convert.ToInt32(grvdrpType);
        o_KFB_ZHGL.N_YXDL   = 1;
        o_KFB_ZHGL.N_HYJRSJ = DateTime.Now;
        o_KFB_ZHGL.N_XZSJ   = DateTime.Now;
        o_KFB_ZHGL.N_HYXG   = DateTime.Now;
        o_KFB_ZHGL.N_DZJDH  = "";
        int i = objUserManagement.Update(o_KFB_ZHGL);

        if (i > 0)
        {
            grvUser.EditIndex = -1;
            Query();
            this.ShowMsg("修改成功");
        }
        else
        {
            this.ShowMsg("修改失败");
        }
    }
Exemple #2
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        string strMD5 = FormsAuthPasswordFormat.MD5.ToString();

        string   strMd5     = FormsAuthentication.HashPasswordForStoringInConfigFile(this.textPassWord.Text.ToUpper(), strMD5).ToUpper();
        KFB_ZHGL o_KFB_ZHGL = new KFB_ZHGL();

        o_KFB_ZHGL.N_HYZH   = this.txtUser.Text.ToUpper();
        o_KFB_ZHGL.N_HYMM   = strMd5;
        o_KFB_ZHGL.N_HYMC   = this.txtTitle.Text;
        o_KFB_ZHGL.N_HYDJ   = Convert.ToInt32(this.dropType.SelectedValue);
        o_KFB_ZHGL.N_YXDL   = 1;
        o_KFB_ZHGL.N_HYJRSJ = DateTime.Now;
        o_KFB_ZHGL.N_XZSJ   = DateTime.Now;
        o_KFB_ZHGL.N_HYXG   = DateTime.Now;
        o_KFB_ZHGL.N_DZJDH  = "";
        int i = objUserManagement.Add(o_KFB_ZHGL);

        if (i > 0)
        {
            Query();
            this.ShowMsg("新增成功");
        }
        else
        {
            this.ShowMsg("新增失败");
        }
    }
Exemple #3
0
  public static string GetFlag(string s_aUserID)
  {
      AgentManageDB objAgentManageDB = new AgentManageDB();
      KFB_ZHGL      m_zhgl           = objAgentManageDB.GetModel(s_aUserID);

      return(m_zhgl.N_ADDFLAG.ToString());
  }
Exemple #4
0
  /// <summary>
  /// 取得上級帳號
  /// </summary>
  /// <param name="o_aPK"></param>
  /// <returns></returns>
  public static string GetUPID(string strparid, string strlvl)
  {
      string        strzh            = "";
      AgentManageDB objAgentManageDB = new AgentManageDB();
      KFB_ZHGL      mo_zhgl          = objAgentManageDB.GetModel(strparid);

      if (strlvl.Equals("5"))
      {
          strzh = mo_zhgl.N_DZJDH;
      }
      else if (strlvl.Equals("6"))
      {
          strzh = mo_zhgl.N_ZJDH;
      }
      else if (strlvl.Equals("7"))
      {
          strzh = mo_zhgl.N_DGDDH;
      }
      else if (strlvl.Equals("8"))
      {
          strzh = mo_zhgl.N_GDDH;
      }
      else if (strlvl.Equals("9"))
      {
          strzh = mo_zhgl.N_ZDLDH;
      }
      return(strzh);
  }
Exemple #5
0
    /// <summary>
    /// 增加一条数据
    /// </summary>
    public void Add(KFB_ZHGL model)
    {
        StringBuilder strSql = new StringBuilder();

        strSql.Append("insert into KFB_ZHGL(");
        strSql.Append("N_ID,N_HYZH,N_HYMM,N_HYMC,N_HYDJ,N_XZSJ,N_HYJRSJ,N_HYXG,N_YXDL,N_DZJDH)");
        strSql.Append(" values (");
        strSql.Append("EXAMPLE_SEQ.nextval,:N_HYZH,:N_HYMM,:N_HYMC,:N_HYDJ,:N_XZSJ,:N_HYJRSJ,:N_HYXG,:N_YXDL,:N_DZJDH)");
        OracleParameter[] parameters =
        {
            new OracleParameter(":N_HYZH",   OracleType.VarChar,   100),
            new OracleParameter(":N_HYMM",   OracleType.VarChar,   100),
            new OracleParameter(":N_HYMC",   OracleType.VarChar,   100),
            new OracleParameter(":N_HYDJ",   OracleType.Number,      4),
            new OracleParameter(":N_XZSJ",   OracleType.DateTime),
            new OracleParameter(":N_HYJRSJ", OracleType.DateTime),
            new OracleParameter(":N_HYXG",   OracleType.DateTime),
            new OracleParameter(":N_YXDL",   OracleType.Number,      4),
            new OracleParameter(":N_DZJDH",  OracleType.VarChar, 100)
        };
        parameters[0].Value = model.N_HYZH;
        parameters[1].Value = model.N_HYMM;
        parameters[2].Value = model.N_HYMC;
        parameters[3].Value = model.N_HYDJ;
        parameters[4].Value = model.N_XZSJ;
        parameters[5].Value = model.N_HYJRSJ;
        parameters[6].Value = model.N_HYXG;
        parameters[7].Value = model.N_YXDL;
        parameters[8].Value = model.N_DZJDH;

        DbHelperOra.ExecuteSql(strSql.ToString(), parameters);
    }
    /// <summary>
    /// 查詢帳號本身的設定
    /// </summary>
    public void SetUI()
    {
        KFB_SETUPMB mo_ZQ = this.objAgentManageAddDB.GetModelMB(this.GetUser);

        this.txtdzrf.Text   = mo_ZQ.N_RFDZ.ToString();
        this.txtdcrf.Text   = mo_ZQ.N_RFDC.ToString();
        this.txtdzdx.Text   = mo_ZQ.N_DXDZ.ToString();
        this.txtdcdx.Text   = mo_ZQ.N_DXDC.ToString();
        this.txtdzdy.Text   = mo_ZQ.N_DYDZ.ToString();
        this.txtdcdy.Text   = mo_ZQ.N_DYDC.ToString();
        this.txtdzds.Text   = mo_ZQ.N_DSDZ.ToString();
        this.txtdcds.Text   = mo_ZQ.N_DSDC.ToString();
        this.txtdzzdrf.Text = mo_ZQ.N_ZDRFDZ.ToString();
        this.txtdczdrf.Text = mo_ZQ.N_ZDRFDC.ToString();
        this.txtdzzddx.Text = mo_ZQ.N_ZDDXDZ.ToString();
        this.txtdczddx.Text = mo_ZQ.N_ZDDXDC.ToString();
        this.txtdzbcrf.Text = mo_ZQ.N_GJDZ.ToString();
        this.txtdcbcrf.Text = mo_ZQ.N_GJDC.ToString();
        this.txtdzgg.Text   = mo_ZQ.N_GGDZ.ToString();
        this.txtdcgg.Text   = mo_ZQ.N_GGDC.ToString();
        this.txtdcsy.Text   = mo_ZQ.N_SYDC.ToString();
        this.txtdzsy.Text   = mo_ZQ.N_SYDZ.ToString();

        KFB_ZHGL mo_zhgl = new KFB_ZHGL();

        mo_zhgl = objAgentManageDB.GetModel(this.GetUser);
        if (mo_zhgl == null)
        {
            KFB_HYGL mo_hygl = objHYGL.GetModel(this.GetUser);
            this.ZHFZ(mo_hygl.N_HYZH.ToString(), "10");
            this.lblName.Text     = mo_hygl.N_HYZH.ToString();
            this.lblRealName.Text = mo_hygl.N_HYMC.ToString();
            this.lblDJ.Text       = "會員";
        }
        else
        {
            if (mo_zhgl.N_HYDJ.ToString() != "4")
            {
                this.ZHFZ(mo_zhgl.N_HYZH.ToString(), mo_zhgl.N_HYDJ.ToString());
            }
            else
            {
                this.DZJFZ();
            }
            this.lblName.Text     = mo_zhgl.N_HYZH.ToString();
            this.lblRealName.Text = mo_zhgl.N_HYMC.ToString();
            this.lblDJ.Text       = Comm.GetLvName(mo_zhgl.N_HYDJ.ToString());
            GetSUB(mo_zhgl.N_HYDJ.ToString(), mo_zhgl.N_HYZH.ToString());
        }
        this.drptyrf.SelectedValue   = mo_ZQ.N_RFTY.ToString();
        this.drptydx.SelectedValue   = mo_ZQ.N_DXTY.ToString();
        this.drptydy.SelectedValue   = mo_ZQ.N_DYTY.ToString();
        this.drptyds.SelectedValue   = mo_ZQ.N_DSTY.ToString();
        this.drptyzdrf.SelectedValue = mo_ZQ.N_ZDRFTY.ToString();
        this.drptyzddx.SelectedValue = mo_ZQ.N_ZDDXTY.ToString();
        this.drptybcrf.SelectedValue = mo_ZQ.N_GJTY.ToString();
        this.drptygg.SelectedValue   = mo_ZQ.N_GGTY.ToString();
        this.drptysy.SelectedValue   = mo_ZQ.N_SYTY.ToString();
        this.drptyrf.SelectedValue   = mo_ZQ.N_RFTY.ToString();
    }
Exemple #7
0
    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;
        }
    }
Exemple #8
0
    /// <summary>
    /// 得到一个对象实体
    /// </summary>
    public KFB_ZHGL GetModel(string N_HYZH)
    {
        StringBuilder strSql = new StringBuilder();

        strSql.Append("select N_ID,N_HYZH,N_HYMM,N_HYMC,N_HYDJ,N_XZSJ,N_HYJRSJ,N_HYXG,N_YXDL from KFB_ZHGL ");
        strSql.Append(" where N_HYZH=:N_HYZH ");
        OracleParameter[] parameters =
        {
            new OracleParameter(":N_HYZH", OracleType.VarChar, 50)
        };
        parameters[0].Value = N_HYZH;

        KFB_ZHGL model = new KFB_ZHGL();
        DataSet  ds    = DbHelperOra.Query(strSql.ToString(), parameters);

        if (ds.Tables[0].Rows.Count > 0)
        {
            if (ds.Tables[0].Rows[0]["N_ID"].ToString() != "")
            {
                model.N_ID = int.Parse(ds.Tables[0].Rows[0]["N_ID"].ToString());
            }
            model.N_HYZH = ds.Tables[0].Rows[0]["N_HYZH"].ToString();
            model.N_HYMM = ds.Tables[0].Rows[0]["N_HYMM"].ToString();
            model.N_HYMC = ds.Tables[0].Rows[0]["N_HYMC"].ToString();
            if (ds.Tables[0].Rows[0]["N_HYDJ"].ToString() != "")
            {
                model.N_HYDJ = int.Parse(ds.Tables[0].Rows[0]["N_HYDJ"].ToString());
            }
            if (ds.Tables[0].Rows[0]["N_XZSJ"].ToString() != "")
            {
                model.N_XZSJ = DateTime.Parse(ds.Tables[0].Rows[0]["N_XZSJ"].ToString());
            }
            if (ds.Tables[0].Rows[0]["N_HYJRSJ"].ToString() != "")
            {
                model.N_HYJRSJ = DateTime.Parse(ds.Tables[0].Rows[0]["N_HYJRSJ"].ToString());
            }
            if (ds.Tables[0].Rows[0]["N_HYXG"].ToString() != "")
            {
                model.N_HYXG = DateTime.Parse(ds.Tables[0].Rows[0]["N_HYXG"].ToString());
            }
            if (ds.Tables[0].Rows[0]["N_YXDL"].ToString() != "")
            {
                model.N_YXDL = int.Parse(ds.Tables[0].Rows[0]["N_YXDL"].ToString());
            }
            return(model);
        }
        else
        {
            return(null);
        }
    }
Exemple #9
0
    /// <summary>
    /// 查詢帳號本身的設定
    /// </summary>
    public void SetUI()
    {
        KFB_SETUPCP mo_ZQ = this.objAgentManageAddDB.GetModelCP(this.GetUser);

        this.txtdzbq.Text = mo_ZQ.N_BQDZ.ToString();
        this.txtdcbq.Text = mo_ZQ.N_BQDC.ToString();
        this.txtdzlq.Text = mo_ZQ.N_LQDZ.ToString();
        this.txtdclq.Text = mo_ZQ.N_LQDC.ToString();
        this.txtdzzq.Text = mo_ZQ.N_ZQDZ.ToString();
        this.txtdczq.Text = mo_ZQ.N_ZQDC.ToString();
        this.txtdzgs.Text = mo_ZQ.N_GSDZ.ToString();
        this.txtdcgs.Text = mo_ZQ.N_GSDC.ToString();
        this.txtdzqz.Text = mo_ZQ.N_QZDZ.ToString();
        this.txtdcqz.Text = mo_ZQ.N_QZDC.ToString();

        KFB_ZHGL mo_zhgl = new KFB_ZHGL();

        mo_zhgl = this.objAgentManageDB.GetModel(this.GetUser);
        if (mo_zhgl == null)
        {
            KFB_HYGL mo_hygl = this.objHYGL.GetModel(this.GetUser);
            this.ZHFZ(mo_hygl.N_HYZH.ToString(), "10");
            this.lblName.Text     = mo_hygl.N_HYZH.ToString();
            this.lblRealName.Text = mo_hygl.N_HYMC.ToString();
            this.lblDJ.Text       = "會員";
        }
        else
        {
            if (mo_zhgl.N_HYDJ.ToString() != "4")
            {
                this.ZHFZ(mo_zhgl.N_HYZH.ToString(), mo_zhgl.N_HYDJ.ToString());
            }
            else
            {
                this.DZJFZ();
            }
            this.lblName.Text     = mo_zhgl.N_HYZH.ToString();
            this.lblRealName.Text = mo_zhgl.N_HYMC.ToString();
            this.lblDJ.Text       = Comm.GetLvName(mo_zhgl.N_HYDJ.ToString());
            GetSUB(mo_zhgl.N_HYDJ.ToString(), mo_zhgl.N_HYZH.ToString());
        }

        this.drptybq.SelectedValue = mo_ZQ.N_BQTY.ToString();
        this.drptylq.SelectedValue = mo_ZQ.N_BQDC.ToString();
        this.drptyzq.SelectedValue = mo_ZQ.N_ZQTY.ToString();
        this.drptygs.SelectedValue = mo_ZQ.N_GSTY.ToString();
        this.drptyqz.SelectedValue = mo_ZQ.N_QZTY.ToString();
    }
Exemple #10
0
    /// <summary>
    /// 查詢帳號本身的設定
    /// </summary>
    public void SetUI()
    {
        KFB_SETUPSM mo_ZQ = this.objAgentManageAddDB.GetModelSM(this.GetUser);

        this.txtdzdy.Text  = mo_ZQ.N_DYDZ.ToString();
        this.txtdcdy.Text  = mo_ZQ.N_DYDC.ToString();
        this.txtdzwz.Text  = mo_ZQ.N_WZDZ.ToString();
        this.txtdcwz.Text  = mo_ZQ.N_WZDC.ToString();
        this.txtdzly.Text  = mo_ZQ.N_LYDZ.ToString();
        this.txtdcly.Text  = mo_ZQ.N_LYDC.ToString();
        this.txtdzwzq.Text = mo_ZQ.N_WZQDZ.ToString();
        this.txtdcwzq.Text = mo_ZQ.N_WZQDC.ToString();

        KFB_ZHGL mo_zhgl = new KFB_ZHGL();

        mo_zhgl = this.objAgentManageDB.GetModel(this.GetUser);
        if (mo_zhgl == null)
        {
            KFB_HYGL mo_hygl = this.objHYGL.GetModel(this.GetUser);
            this.ZHFZ(mo_hygl.N_HYZH.ToString(), "10");
            this.lblName.Text     = mo_hygl.N_HYZH.ToString();
            this.lblRealName.Text = mo_hygl.N_HYMC.ToString();
            this.lblDJ.Text       = "會員";
        }
        else
        {
            if (mo_zhgl.N_HYDJ.ToString() != "4")
            {
                this.ZHFZ(mo_zhgl.N_HYZH.ToString(), mo_zhgl.N_HYDJ.ToString());
            }
            else
            {
                this.DZJFZ();
            }
            this.lblName.Text     = mo_zhgl.N_HYZH.ToString();
            this.lblRealName.Text = mo_zhgl.N_HYMC.ToString();
            this.lblDJ.Text       = Comm.GetLvName(mo_zhgl.N_HYDJ.ToString());
            GetSUB(mo_zhgl.N_HYDJ.ToString(), mo_zhgl.N_HYZH.ToString());
        }

        this.drptydy.SelectedValue  = mo_ZQ.N_DYTY.ToString();
        this.drptywz.SelectedValue  = mo_ZQ.N_WZTY.ToString();
        this.drptyly.SelectedValue  = mo_ZQ.N_LYTY.ToString();
        this.drptywzq.SelectedValue = mo_ZQ.N_WZQTY.ToString();
    }
Exemple #11
0
    protected void btnOperate_Click(object sender, EventArgs e)
    {
        try
        {
            Hashtable GetSql = new Hashtable();


            LinkButton btn     = (LinkButton)sender;
            int        i_Index = ((GridViewRow)(btn.Parent.Parent)).RowIndex;

            string s_NID = "";
            s_NID = ((GridView)(btn.Parent.Parent.Parent.Parent)).Rows[i_Index].Cells[0].Text.ToString().Trim();
            KFB_ZHGL mo_zhgl = this.objAgentManageDB.GetModel(s_NID);

            if (btn.Text == "啟用")
            {
                this.objAgentManageDB.NoLogZH("N_HYZH", mo_zhgl.N_HYZH, "1", GetSql);
            }
            else if (btn.Text == "停用")
            {
                this.objAgentManageDB.NoLogZH(Comm.GetZHCol(mo_zhgl.N_HYDJ.ToString()), mo_zhgl.N_HYZH, "0", GetSql);
                this.objAgentManageDB.NoLogHY(Comm.GetZHCol(mo_zhgl.N_HYDJ.ToString()), mo_zhgl.N_HYZH, "0", GetSql);
            }

            else if (btn.Text == "解除停押")
            {
                this.objAgentManageDB.NoXZZH("N_HYZH", mo_zhgl.N_HYZH, "1", GetSql);
            }
            else
            {
                this.objAgentManageDB.NoXZZH(Comm.GetZHCol(mo_zhgl.N_HYDJ.ToString()), mo_zhgl.N_HYZH, "0", GetSql);
                this.objAgentManageDB.NoXZHY(Comm.GetZHCol(mo_zhgl.N_HYDJ.ToString()), mo_zhgl.N_HYZH, "0", GetSql);
            }
            this.objAgentManageDB.Update(GetSql);

            SetGrid(this.drdl.SelectedValue);
        }
        catch
        {
            this.ShowMsg("修改失敗");
        }
    }
Exemple #12
0
  /// <summary>
  ///
  /// </summary>
  ///
  public static string GetPage(string strlv, string strzh)
  {
      string        strturn          = "";
      string        strpara          = "";
      AgentManageDB objAgentManageDB = new AgentManageDB();
      KFB_ZHGL      m_zhgl           = objAgentManageDB.GetModel(strzh);

      if (m_zhgl != null)
      {
          if (strlv.Equals("9"))
          {
              strpara = "?n_dzjdh=" + m_zhgl.N_DZJDH + "&n_zjdh=" + m_zhgl.N_ZJDH + "&n_dgddh=" + m_zhgl.N_DGDDH + "&n_gddh=" + m_zhgl.N_GDDH + "&n_zdldh=" + m_zhgl.N_ZDLDH + "&n_dldh=" + m_zhgl.N_DLDH;
          }
          else if (strlv.Equals("5"))
          {
              strpara = "?id=" + m_zhgl.N_DZJDH;
          }
          else
          {
              strpara = "?dzjid=" + m_zhgl.N_DZJDH + "&zjid=" + m_zhgl.N_ZJDH + "&dgdid=" + m_zhgl.N_DGDDH + "&gdid=" + m_zhgl.N_GDDH + "&zdlid=" + m_zhgl.N_ZDLDH + "&dlid=" + m_zhgl.N_DLDH;
          }
      }
      switch (strlv)
      {
      case "4": strturn = "dzjgl.aspx" + strpara; break;

      case "5": strturn = "zjgl.aspx" + strpara; break;

      case "6": strturn = "dgdgl.aspx" + strpara; break;

      case "7": strturn = "gdgl.aspx" + strpara; break;

      case "8": strturn = "AgentManage.aspx" + strpara; break;

      case "9": strturn = "dlgl.aspx" + strpara; break;
      }
      return(strturn);
  }
Exemple #13
0
    /// <summary>
    /// 更新一条数据
    /// </summary>
    public void Update(KFB_ZHGL model)
    {
        StringBuilder strSql = new StringBuilder();

        strSql.Append("update KFB_ZHGL set ");
        strSql.Append("N_HYZH=:N_HYZH,");
        strSql.Append("N_HYMM=:N_HYMM,");
        strSql.Append("N_HYMC=:N_HYMC,");
        strSql.Append("N_HYDJ=:N_HYDJ,");
        strSql.Append("N_XZSJ=:N_XZSJ,");
        strSql.Append("N_HYJRSJ=:N_HYJRSJ,");
        strSql.Append("N_HYXG=:N_HYXG,");
        strSql.Append("N_YXDL=:N_YXDL");
        strSql.Append(" where N_HYZH=:N_HYZH ");
        OracleParameter[] parameters =
        {
            new OracleParameter(":N_HYZH",   OracleType.VarChar,   100),
            new OracleParameter(":N_HYMM",   OracleType.VarChar,   100),
            new OracleParameter(":N_HYMC",   OracleType.VarChar,   100),
            new OracleParameter(":N_HYDJ",   OracleType.Number,      4),
            new OracleParameter(":N_XZSJ",   OracleType.DateTime),
            new OracleParameter(":N_HYJRSJ", OracleType.DateTime),
            new OracleParameter(":N_HYXG",   OracleType.DateTime),
            new OracleParameter(":N_YXDL",   OracleType.Number, 4)
        };
        parameters[0].Value = model.N_HYZH;
        parameters[1].Value = model.N_HYMM;
        parameters[2].Value = model.N_HYMC;
        parameters[3].Value = model.N_HYDJ;
        parameters[4].Value = model.N_XZSJ;
        parameters[5].Value = model.N_HYJRSJ;
        parameters[6].Value = model.N_HYXG;
        parameters[7].Value = model.N_YXDL;

        DbHelperOra.ExecuteSql(strSql.ToString(), parameters);
    }
Exemple #14
0
    /// <summary>
    /// 保存按鈕
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            #region "修改籃球設定檔"
            KFB_SETUPLQ mo_lq   = new KFB_SETUPLQ();
            Hashtable   GetSql  = new Hashtable();
            KFB_ZHGL    mo_zhgl = new KFB_ZHGL();
            mo_zhgl = this.objAgentManageDB.GetModel(this.lblName.Text.ToString().Trim());

            mo_lq.N_HYZH = this.lblName.Text;
            mo_lq.N_RFTY = Convert.ToDecimal(this.drptyrf.SelectedValue.ToString());
            mo_lq.N_RFDZ = Convert.ToDecimal(this.txtdzrf.Text);
            mo_lq.N_RFDC = Convert.ToDecimal(this.txtdcrf.Text);
            mo_lq.N_RFDD = Convert.ToDecimal(this.txtddrf.Text);

            mo_lq.N_DXTY = Convert.ToDecimal(this.drptydx.SelectedValue.ToString());
            mo_lq.N_DXDZ = Convert.ToDecimal(this.txtdzdx.Text);
            mo_lq.N_DXDC = Convert.ToDecimal(this.txtdcdx.Text);
            mo_lq.N_DXDD = Convert.ToDecimal(this.txtdddx.Text);

            mo_lq.N_DYTY = Convert.ToDecimal(this.drptydy.SelectedValue.ToString());
            mo_lq.N_DYDZ = Convert.ToDecimal(this.txtdzdy.Text);
            mo_lq.N_DYDC = Convert.ToDecimal(this.txtdcdy.Text);
            mo_lq.N_DYDD = Convert.ToDecimal(this.txtdddy.Text);

            mo_lq.N_DSTY = Convert.ToDecimal(this.drptyds.SelectedValue.ToString());
            mo_lq.N_DSDZ = Convert.ToDecimal(this.txtdzds.Text);
            mo_lq.N_DSDC = Convert.ToDecimal(this.txtdcds.Text);
            mo_lq.N_DSDD = Convert.ToDecimal(this.txtddds.Text);

            mo_lq.N_ZDRFTY = Convert.ToDecimal(this.drptyzdrf.SelectedValue.ToString());
            mo_lq.N_ZDRFDZ = Convert.ToDecimal(this.txtdzzdrf.Text);
            mo_lq.N_ZDRFDC = Convert.ToDecimal(this.txtdczdrf.Text);
            mo_lq.N_ZDRFDD = Convert.ToDecimal(this.txtddzdrf.Text);

            mo_lq.N_ZDDXTY = Convert.ToDecimal(this.drptyzddx.SelectedValue.ToString());
            mo_lq.N_ZDDXDZ = Convert.ToDecimal(this.txtdzzddx.Text);
            mo_lq.N_ZDDXDC = Convert.ToDecimal(this.txtdczddx.Text);
            mo_lq.N_ZDDXDD = Convert.ToDecimal(this.txtddzddx.Text);

            mo_lq.N_BCRFTY = Convert.ToDecimal(this.drptybcrf.SelectedValue.ToString());
            mo_lq.N_BCRFDZ = Convert.ToDecimal(this.txtdzbcrf.Text);
            mo_lq.N_BCRFDC = Convert.ToDecimal(this.txtdcbcrf.Text);
            mo_lq.N_BCRFDD = Convert.ToDecimal(this.txtddbcrf.Text);

            mo_lq.N_BCDXTY = Convert.ToDecimal(this.drptybcdx.SelectedValue.ToString());
            mo_lq.N_BCDXDZ = Convert.ToDecimal(this.txtdzbcdx.Text);
            mo_lq.N_BCDXDC = Convert.ToDecimal(this.txtdcbcdx.Text);
            mo_lq.N_BCDXDD = Convert.ToDecimal(this.txtddbcdx.Text);

            mo_lq.N_BCDYTY = Convert.ToDecimal(this.drptybcdy.SelectedValue.ToString());
            mo_lq.N_BCDYDZ = Convert.ToDecimal(this.txtdzbcdy.Text);
            mo_lq.N_BCDYDC = Convert.ToDecimal(this.txtdcbcdy.Text);
            mo_lq.N_BCDYDD = Convert.ToDecimal(this.txtddbcdy.Text);

            mo_lq.N_BCDSTY = Convert.ToDecimal(this.drptybcds.SelectedValue.ToString());
            mo_lq.N_BCDSDZ = Convert.ToDecimal(this.txtdzbcds.Text);
            mo_lq.N_BCDSDC = Convert.ToDecimal(this.txtdcbcds.Text);
            mo_lq.N_BCDSDD = Convert.ToDecimal(this.txtddbcds.Text);

            mo_lq.N_GGTY = Convert.ToDecimal(this.drptygg.SelectedValue.ToString());
            mo_lq.N_GGDZ = Convert.ToDecimal(this.txtdzgg.Text);
            mo_lq.N_GGDC = Convert.ToDecimal(this.txtdcgg.Text);
            mo_lq.N_GGDD = Convert.ToDecimal(this.txtddgg.Text);

            mo_lq.N_GJTY = Convert.ToDecimal(this.drptygj.SelectedValue.ToString());
            mo_lq.N_GJDZ = Convert.ToDecimal(this.txtdzgj.Text);
            mo_lq.N_GJDC = Convert.ToDecimal(this.txtdcgj.Text);
            mo_lq.N_GJDD = Convert.ToDecimal(this.txtddgj.Text);

            mo_lq.N_DJRFTY = Convert.ToDecimal(this.drptydjrf.SelectedValue.ToString());
            mo_lq.N_DJRFDZ = Convert.ToDecimal(this.txtdzdjrf.Text);
            mo_lq.N_DJRFDC = Convert.ToDecimal(this.txtdcdjrf.Text);
            mo_lq.N_DJRFDD = Convert.ToDecimal(this.txtdddjrf.Text);

            mo_lq.N_DJDXTY = Convert.ToDecimal(this.drptydjdx.SelectedValue.ToString());
            mo_lq.N_DJDXDZ = Convert.ToDecimal(this.txtdzdjdx.Text);
            mo_lq.N_DJDXDC = Convert.ToDecimal(this.txtdcdjdx.Text);
            mo_lq.N_DJDXDD = Convert.ToDecimal(this.txtdddjdx.Text);

            mo_lq.N_DJDSTY = Convert.ToDecimal(this.drptydjds.SelectedValue.ToString());
            mo_lq.N_DJDSDZ = Convert.ToDecimal(this.txtdzdjds.Text);
            mo_lq.N_DJDSDC = Convert.ToDecimal(this.txtdcdjds.Text);
            mo_lq.N_DJDSDD = Convert.ToDecimal(this.txtdddjds.Text);

            this.objAgentManageDB.UpdateLQ(mo_lq, GetSql);
            this.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 = this.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 = this.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(',');
                        this.objAgentManageDB.Update("lq", strvalue[0].ToString(), strvalue[1].ToString(), strZH);
                    }
                }
            }
            #endregion


            this.ShowMsg("修改成功!");
        }
        catch (Exception ex)
        {
            this.ShowMsg("修改失败请联系管理员!");
        }
    }
Exemple #15
0
    /// <summary>
    /// 查詢帳號本身的設定
    /// </summary>
    public void SetUI()
    {
        KFB_SETUPZQ mo_ZQ = this.objAgentManageAddDB.GetModelZQ(this.GetUser);

        this.txtdzrf.Text   = mo_ZQ.N_RFDZ.ToString();
        this.txtdcrf.Text   = mo_ZQ.N_RFDC.ToString();
        this.txtdzdx.Text   = mo_ZQ.N_DXDZ.ToString();
        this.txtdcdx.Text   = mo_ZQ.N_DXDC.ToString();
        this.txtdzdy.Text   = mo_ZQ.N_DYDZ.ToString();
        this.txtdcdy.Text   = mo_ZQ.N_DYDC.ToString();
        this.txtdzds.Text   = mo_ZQ.N_DSDZ.ToString();
        this.txtdcds.Text   = mo_ZQ.N_DSDC.ToString();
        this.txtdzzdrf.Text = mo_ZQ.N_ZDRFDZ.ToString();
        this.txtdczdrf.Text = mo_ZQ.N_ZDRFDC.ToString();
        this.txtdzzddx.Text = mo_ZQ.N_ZDDXDZ.ToString();
        this.txtdczddx.Text = mo_ZQ.N_ZDDXDC.ToString();
        this.txtdzbcrf.Text = mo_ZQ.N_BCRFDZ.ToString();
        this.txtdcbcrf.Text = mo_ZQ.N_BCRFDC.ToString();
        this.txtdzbcdx.Text = mo_ZQ.N_BCDXDZ.ToString();
        this.txtdcbcdx.Text = mo_ZQ.N_BCDXDC.ToString();
        this.txtdzbcdy.Text = mo_ZQ.N_BCDYDZ.ToString();
        this.txtdcbcdy.Text = mo_ZQ.N_BCDYDC.ToString();
        this.txtdzrqs.Text  = mo_ZQ.N_RQSDZ.ToString();
        this.txtdcrqs.Text  = mo_ZQ.N_RQSDC.ToString();
        this.txtdzbd.Text   = mo_ZQ.N_BDDZ.ToString();
        this.txtdcbd.Text   = mo_ZQ.N_BDDC.ToString();
        this.txtdzbqc.Text  = mo_ZQ.N_BQCDZ.ToString();
        this.txtdcbqc.Text  = mo_ZQ.N_BQCDC.ToString();
        this.txtdzgg.Text   = mo_ZQ.N_GGDZ.ToString();
        this.txtdcgg.Text   = mo_ZQ.N_GGDC.ToString();
        this.txtdzgj.Text   = mo_ZQ.N_GJDZ.ToString();
        this.txtdcgj.Text   = mo_ZQ.N_GJDC.ToString();

        KFB_ZHGL mo_zhgl = new KFB_ZHGL();

        mo_zhgl = this.objAgentManageDB.GetModel(this.GetUser);
        if (mo_zhgl == null)
        {
            KFB_HYGL mo_hygl = objHYGL.GetModel(this.GetUser);
            this.ZHFZ(mo_hygl.N_HYZH.ToString(), "10");
            this.lblName.Text     = mo_hygl.N_HYZH.ToString();
            this.lblRealName.Text = mo_hygl.N_HYMC.ToString();
            this.lblDJ.Text       = "會員";
        }
        else
        {
            if (mo_zhgl.N_HYDJ.ToString() != "4")
            {
                this.ZHFZ(mo_zhgl.N_HYZH.ToString(), mo_zhgl.N_HYDJ.ToString());
            }
            else
            {
                this.DZJFZ();
            }
            this.lblName.Text     = mo_zhgl.N_HYZH.ToString();
            this.lblRealName.Text = mo_zhgl.N_HYMC.ToString();
            this.lblDJ.Text       = Comm.GetLvName(mo_zhgl.N_HYDJ.ToString());
            GetSUB(mo_zhgl.N_HYDJ.ToString(), mo_zhgl.N_HYZH.ToString());
        }
        this.drptyarf.SelectedValue   = mo_ZQ.N_ARFTY.ToString();
        this.drptybrf.SelectedValue   = mo_ZQ.N_BRFTY.ToString();
        this.drptycrf.SelectedValue   = mo_ZQ.N_CRFTY.ToString();
        this.drptyadx.SelectedValue   = mo_ZQ.N_ADXTY.ToString();
        this.drptybdx.SelectedValue   = mo_ZQ.N_BDXTY.ToString();
        this.drptycdx.SelectedValue   = mo_ZQ.N_CDXTY.ToString();
        this.drptyady.SelectedValue   = mo_ZQ.N_ADYTY.ToString();
        this.drptybdy.SelectedValue   = mo_ZQ.N_BDYTY.ToString();
        this.drptycdy.SelectedValue   = mo_ZQ.N_CDYTY.ToString();
        this.drptyads.SelectedValue   = mo_ZQ.N_ADSTY.ToString();
        this.drptybds.SelectedValue   = mo_ZQ.N_BDSTY.ToString();
        this.drptycds.SelectedValue   = mo_ZQ.N_CDSTY.ToString();
        this.drptyazdrf.SelectedValue = mo_ZQ.N_AZDRFTY.ToString();
        this.drptybzdrf.SelectedValue = mo_ZQ.N_BZDRFTY.ToString();
        this.drptyczdrf.SelectedValue = mo_ZQ.N_CZDRFTY.ToString();
        this.drptyazddx.SelectedValue = mo_ZQ.N_AZDDXTY.ToString();
        this.drptybzddx.SelectedValue = mo_ZQ.N_BZDDXTY.ToString();
        this.drptyczddx.SelectedValue = mo_ZQ.N_CZDDXTY.ToString();
        this.drptyabcrf.SelectedValue = mo_ZQ.N_ABCRFTY.ToString();
        this.drptybbcrf.SelectedValue = mo_ZQ.N_BBCRFTY.ToString();
        this.drptycbcrf.SelectedValue = mo_ZQ.N_CBCRFTY.ToString();
        this.drptyabcdx.SelectedValue = mo_ZQ.N_ABCDXTY.ToString();
        this.drptybbcdx.SelectedValue = mo_ZQ.N_BBCDXTY.ToString();
        this.drptycbcdx.SelectedValue = mo_ZQ.N_CBCDXTY.ToString();
        this.drptyabcdy.SelectedValue = mo_ZQ.N_ABCDYTY.ToString();
        this.drptybbcdy.SelectedValue = mo_ZQ.N_BBCDYTY.ToString();
        this.drptycbcdy.SelectedValue = mo_ZQ.N_CBCDYTY.ToString();
        this.drptyarqs.SelectedValue  = mo_ZQ.N_ARQSTY.ToString();
        this.drptybrqs.SelectedValue  = mo_ZQ.N_BRQSTY.ToString();
        this.drptycrqs.SelectedValue  = mo_ZQ.N_CRQSTY.ToString();
        this.drptyabd.SelectedValue   = mo_ZQ.N_ABDTY.ToString();
        this.drptybbd.SelectedValue   = mo_ZQ.N_BBDTY.ToString();
        this.drptycbd.SelectedValue   = mo_ZQ.N_CBDTY.ToString();
        this.drptyabqc.SelectedValue  = mo_ZQ.N_ABQCTY.ToString();
        this.drptybbqc.SelectedValue  = mo_ZQ.N_BBQCTY.ToString();
        this.drptycbqc.SelectedValue  = mo_ZQ.N_CBQCTY.ToString();
        this.drptyagg.SelectedValue   = mo_ZQ.N_AGGTY.ToString();
        this.drptybgg.SelectedValue   = mo_ZQ.N_BGGTY.ToString();
        this.drptycgg.SelectedValue   = mo_ZQ.N_CGGTY.ToString();
        this.drptyagj.SelectedValue   = mo_ZQ.N_AGJTY.ToString();
        this.drptybgj.SelectedValue   = mo_ZQ.N_BGJTY.ToString();
        this.drptycgj.SelectedValue   = mo_ZQ.N_CGJTY.ToString();
    }
Exemple #16
0
    /// <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("修改失敗,請通知管理員!");
        }
    }
Exemple #17
0
    /// <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("修改失敗,請通知管理員!");
        }
    }
    protected void btdel_Click(object sender, EventArgs e)
    {
        KFB_ZHGL   mo_zhgl = new KFB_ZHGL();
        LinkButton btn     = (LinkButton)sender;
        int        i_Index = ((GridViewRow)(btn.Parent.Parent)).RowIndex;

        string s_NID = "";

        s_NID   = ((GridView)(btn.Parent.Parent.Parent.Parent)).Rows[i_Index].Cells[0].Text.ToString().Trim();
        mo_zhgl = objAgentManageDB.GetModel(s_NID);

        //判断是否有注單
        int i_Count = objAgentManageDB.GetZD(s_NID, Comm.GetZHCol(mo_zhgl.N_HYDJ.ToString()));

        if (i_Count > 0)
        {
            this.ShowMsg("本賬號已有注單,無法删除!");
            return;
        }

        int i_HYCount = objAgentManageDB.GetHYZD(s_NID, Comm.GetZHCol(mo_zhgl.N_HYDJ.ToString()));

        if (i_HYCount > 0)
        {
            this.ShowMsg("本賬號下級會員已有注單,無法删除!");
            return;
        }

        int i_oCount = objAgentManageDB.GetOZD(s_NID, Comm.GetZHCol(mo_zhgl.N_HYDJ.ToString()));

        if (i_oCount > 0)
        {
            this.ShowMsg("本賬號已有歷史注單,無法删除!");
            return;
        }

        int i_oHYCount = objAgentManageDB.GetOHYZD(s_NID, Comm.GetZHCol(mo_zhgl.N_HYDJ.ToString()));

        if (i_oHYCount > 0)
        {
            this.ShowMsg("本賬號下級會員已有歷史注單,無法删除!");
            return;
        }

        try
        {
            //判斷是否存在
            bool chuser = objAgentManageDB.Exists(s_NID);
            if (!chuser)
            {
                this.ShowMsg("該會員已被刪除!");
            }
            else//存在則修改
            {
                #region "修改上级剩余额度"
                objAgentManageDB.UpSJED(mo_zhgl);

                #endregion
                //o_KFB_ZHGL.Delete(strparid, Convert.ToInt32(strlvl));
                objAgentManageDB.DeleteAll(s_NID, Comm.GetZHCol(mo_zhgl.N_HYDJ.ToString()));

                SetGrid(this.drzdl.SelectedValue);
            }
        }
        catch (Exception ex)
        {
            this.WriteLog("用户名=" + mUserID + ex.ToString());
            this.ShowMsg("删除失败");
        }
    }