Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     User_Load("login");
     pids = Convert.ToInt32(getvalue(4));
     Checkgvlist0();
     if (!IsPostBack)
     {
         dropuser(); year(); mouth(); showqi(); GetList(); SHgvlist();
         if (pids == 1)//验证设置打分公式
         {
             dafen.Visible = true;
         }
         else
         {
             dafen.Visible = false;
         }
         DataTable dt = com.COM_Proc_Sel1("PC_SelOpenTB", "1");
         if (dt.Rows.Count != 0)
         {
             gvlist.Enabled  = true;
             Button3.Enabled = true;
         }
         else
         {     //打分表格隐藏
             gvlist.Enabled  = false;
             Button3.Enabled = false;
         }
     }
 }
Ejemplo n.º 2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Daiv_OA.BLL.URLENCRYP urlen = new Daiv_OA.BLL.URLENCRYP();
            DataTable             dt    = com.COM_Proc_Sel1("PC_getOA_email", UserId.ToString());

            if (dt.Rows.Count == 0)
            {
                dt.Rows.Clear();
                DataRow dr = dt.NewRow();
                dr["emailname"]  = emailname.Text.Trim() + Tpdropdown.Text.Trim();
                dr["emailpwd"]   = urlen.Encryp(emailpwd.Text.Trim());
                dr["uid"]        = UserId.ToString();
                dr["inserttime"] = DateTime.Now.ToString();
                dt.Rows.Add(dr);
                com.COM_Add(dt, "OA_emailTB", "@emailname,@emailpwd,@uid,@inserttime");
                emailname.Text = emailpwd.Text = "";
                Tools.Common.JavaScript.MessageBox(this, "保存成功!");
            }
        }