Exemple #1
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        Hashtable hashtable = new Hashtable();

        hashtable.Add("ClassID", this.ClassID.ToString());
        hashtable.Add("TempletName", SqlStringConstructor.GetQuotedString(this.txtTemplateName.Text));
        hashtable.Add("Content", SqlStringConstructor.GetQuotedString(this.txtContent.Text));
        if (this.TemplateID == 0)
        {
            if (ConferenceManage.AddMeetingTemplate(hashtable))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
        else
        {
            string where = " where RecordID = " + this.TemplateID.ToString();
            if (ConferenceManage.UpdMeetingTemplate(hashtable, where))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
    }
Exemple #2
0
        /// <summary>
        /// 根据参数Jxbbh,获取教学班详细信息
        /// </summary>
        /// <param name="jxbbh">教学班编号</param>
        public void LoadData(string jsbh, string kcsjmc, string jxbmc, string kbxn, string kbxq)
        {
            Database db = new Database();               //实例化一个Database类

            string sql = "";

            sql = "Select * from [js_kcsj_gxb],[jsb],[kcsjb],[jxbb] where [jsb].jsbh = "
                  + SqlStringConstructor.GetQuotedString(jsbh) + " And [kcsjb].kcsjmc = " + SqlStringConstructor.GetQuotedString(kcsjmc)
                  + " And [jxbb].jxbmc = " + SqlStringConstructor.GetQuotedString(jxbmc) + " And kbxn = " + SqlStringConstructor.GetQuotedString(kbxn) + " And kbxq ="
                  + SqlStringConstructor.GetQuotedString(kbxq) + "And [js_kcsj_gxb].jsbh=[jsb].jsbh And [js_kcsj_gxb].kcsjbh=[kcsjb].kcsjbh And [js_kcsj_gxb].jxbbh=[jxbb].jxbbh";


            DataRow dr = db.GetDataRow(sql);    //利用Database类的GetDataRow方法查询用户数据

            //根据查询得到的数据,对成员赋值
            if (dr != null)
            {
                this._jsxm   = GetSafeData.ValidateDataRow_S(dr, "jsxm");
                this._jsbh   = GetSafeData.ValidateDataRow_S(dr, "jsbh");
                this._kcsjmc = GetSafeData.ValidateDataRow_S(dr, "kcsjmc");
                this._kcsjbh = GetSafeData.ValidateDataRow_S(dr, "kcsjbh");
                this._jxbbh  = GetSafeData.ValidateDataRow_S(dr, "jxbbh");
                this._jxbmc  = GetSafeData.ValidateDataRow_S(dr, "jxbmc");
                this._kbxn   = GetSafeData.ValidateDataRow_S(dr, "kbxn");
                this._kbxq   = GetSafeData.ValidateDataRow_S(dr, "kbxq");

                this._exist = true;
            }
            else
            {
                this._exist = false;
            }
        }
Exemple #3
0
    protected void BtnAdd_Click(object sender, EventArgs e)
    {
        DateTime  arg_05_0  = DateTime.Now;
        Hashtable hashtable = new Hashtable();

        hashtable.Add("FileID", SqlStringConstructor.GetQuotedString(this.FileID.ToString()));
        hashtable.Add("Title", SqlStringConstructor.GetQuotedString(this.txtTitle.Text));
        hashtable.Add("Remark", SqlStringConstructor.GetQuotedString(this.txtRemark.Text));
        hashtable.Add("IsPigeonhole", SqlStringConstructor.GetQuotedString("0"));
        hashtable.Add("UserCode", SqlStringConstructor.GetQuotedString(this.Session["yhdm"].ToString()));
        hashtable.Add("RecordDate", SqlStringConstructor.GetQuotedString(this.txtRecordDate.Text.ToString()));
        hashtable.Add("CorpCode", SqlStringConstructor.GetQuotedString(this.CorpCode));
        hashtable.Add("AuditState", "-1");
        if (base.Request.QueryString["fid"] == "")
        {
            if (DocumentAction.AddSendFileInfo(hashtable))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
        else
        {
            string where = " where FileID = '" + this.FileID.ToString() + " '";
            if (DocumentAction.UpdSendFileInfo(hashtable, where))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
    }
        /// <summary>
        /// 根据参数loginName,获取用户详细信息
        /// </summary>
        /// <param name="czy">用户登录名</param>
        public void LoadData(string czy)
        {
            Database db = new Database();               //实例化一个Database类

            string sql = "";

            sql = "Select * from [czyb],[yxb] where czy = "
                  + SqlStringConstructor.GetQuotedString(czy)
                  + " And [czyb].yxbh=[yxb].yxbh";

            DataRow dr = db.GetDataRow(sql);    //利用Database类的GetDataRow方法查询用户数据

            //根据查询得到的数据,对成员赋值
            if (dr != null)
            {
                this._czy  = GetSafeData.ValidateDataRow_S(dr, "czy");
                this._dlmm = GetSafeData.ValidateDataRow_S(dr, "dlmm");
                this._yxmc = GetSafeData.ValidateDataRow_S(dr, "yxmc");
                this._qx   = GetSafeData.ValidateDataRow_S(dr, "qx");

                //解密口令
                this._dlmm = Encrypt.DecryptString(_dlmm, _czy);

                this._exist = true;
            }
            else
            {
                this._exist = false;
            }
        }
Exemple #5
0
    protected void BtnAdd_Click(object sender, EventArgs e)
    {
        Guid.NewGuid();
        DateTime  arg_0B_0  = DateTime.Now;
        Hashtable hashtable = new Hashtable();

        hashtable.Add("FileNumber", SqlStringConstructor.GetQuotedString(this.txtFileNumber.Text));
        hashtable.Add("SignUserName", SqlStringConstructor.GetQuotedString(this.txtSignUserName.Text));
        hashtable.Add("DraftDept", SqlStringConstructor.GetQuotedString(this.txtDraftDept.Text));
        hashtable.Add("IssueRange", SqlStringConstructor.GetQuotedString(this.txtIssueRange.Text));
        hashtable.Add("IssuePage", SqlStringConstructor.GetQuotedString(this.txtIssuePage.Text));
        hashtable.Add("ShareNumber", SqlStringConstructor.GetQuotedString(this.txtShareNumber.Text));
        hashtable.Add("IssueDate", SqlStringConstructor.GetQuotedString(this.txtIssueDate.Text));
        hashtable.Add("Remark", SqlStringConstructor.GetQuotedString(this.txtRemark.Text));
        if (this.FileUpload1.HasFile)
        {
            HttpPostedFile postedFile = this.FileUpload1.PostedFile;
            com.jwsoft.pm.entpm.action.FileUpload fileUpload = new com.jwsoft.pm.entpm.action.FileUpload();
            string[] array = fileUpload.Upload(postedFile, 1);
            hashtable.Add("OriginalName", SqlStringConstructor.GetQuotedString(array[0]));
            hashtable.Add("FilePath", SqlStringConstructor.GetQuotedString(array[1]));
        }
        string where = " where FileID = '" + this.FileID.ToString() + " '";
        if (DocumentAction.UpdSendFileInfo(hashtable, where))
        {
            this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
            return;
        }
        this.JS.Text = "alert('保存失败!');";
    }
Exemple #6
0
 protected void BtnAdd_Click(object sender, System.EventArgs e)
 {
     System.Collections.Hashtable hashtable = new System.Collections.Hashtable();
     hashtable.Add("TemplateID", this.TemplateID.ToString());
     hashtable.Add("MainUser", SqlStringConstructor.GetQuotedString(this.UserCode.ToString()));
     hashtable.Add("SecondUser", SqlStringConstructor.GetQuotedString(this.hdnDbr.Value));
     hashtable.Add("TempNodeId", this.TempNodeID.ToString());
     if (this.NodeID == 0)
     {
         if (FlowTemplateAction.AddAgent(hashtable))
         {
             base.RegisterScript("top.ui.tabSuccess({ parentName: '_dbrinfo'});");
             return;
         }
         base.RegisterScript("top.ui.alert('保存失败');");
         return;
     }
     else
     {
         string where = " where NodeId = '" + this.NodeID + " '";
         if (FlowTemplateAction.UpdAgent(hashtable, where))
         {
             base.RegisterScript("top.ui.tabSuccess({ parentName: '_dbrinfo'});");
             return;
         }
         base.RegisterScript("top.ui.alert('保存失败');");
         return;
     }
 }
Exemple #7
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        int a = Convert.ToInt32(txtHigh.Value) - Convert.ToInt32(txtLow.Value);

        if (a != 1)
        {
            Response.Write("<Script Language=JavaScript>alert('学年设置错误!');history.go(-1);</Script>");
        }
        else
        {
            XND       xnd = new XND();
            string    i   = txtLow.Value + "-" + txtHigh.Value;
            Hashtable ht  = new Hashtable();
            Hashtable ht1 = new Hashtable();
            string where = "Where [xnd] = " + SqlStringConstructor.GetQuotedString(i);
            string where1 = "Where [xnd] <> " + SqlStringConstructor.GetQuotedString(i);
            ht.Add("mrxn", 1);
            ht1.Add("mrxn", 0);
            if (XND.HasXND(i))
            {
                XND.Update(ht, where);
                XND.Update(ht1, where1);
            }
            else
            {
                ht.Add("xnd", SqlStringConstructor.GetQuotedString(i));
                XND.Add(ht);
                XND.Update(ht1, where1);
            }
        }
        InitData();
    }
Exemple #8
0
    private void addFlowChart_top1()
    {
        int rowNum = 1;

        System.Collections.Hashtable hashtable = new System.Collections.Hashtable();
        hashtable.Add("TemplateID", this.TemplateID.ToString());
        hashtable.Add("RowNum", rowNum.ToString());
        hashtable.Add("Column1", SqlStringConstructor.GetQuotedString("1;0;开始"));
        DataRow dataRow = FlowTemplateAction.QueryFlowChart_top1(this.TemplateID, rowNum);

        if (dataRow != null)
        {
            if ((dataRow["TemplateID"].ToString() == "" || dataRow["TemplateID"] == null) && !FlowTemplateAction.AddFlowChart(hashtable))
            {
                this.JS.Text = "alert('添加数据失败!')";
                return;
            }
        }
        else
        {
            if (!FlowTemplateAction.AddFlowChart(hashtable))
            {
                this.JS.Text = "alert('添加数据失败!')";
            }
        }
    }
Exemple #9
0
        /// <summary>
        /// 根据参数jsbh,获取教师详细信息
        /// </summary>
        /// <param name="jsbh">教师编号/param>
        public void LoadData(string jsbh)
        {
            Database db = new Database();               //实例化一个Database类

            string sql = "";

            sql = "Select * from [jsb],[yxb],[zwb],[zcb] where jsbh = " + SqlStringConstructor.GetQuotedString(jsbh)
                  + "And [jsb].yxbh = [yxb].yxbh And [jsb].zcbh = [zcb].zcbh And [jsb].zwbh = [zwb].zwbh";

            DataRow dr = db.GetDataRow(sql);    //利用Database类的GetDataRow方法查询数据

            //根据查询得到的数据,对成员赋值
            if (dr != null)
            {
                this._jsbh = GetSafeData.ValidateDataRow_S(dr, "Jsbh");
                this._jsxm = GetSafeData.ValidateDataRow_S(dr, "Jsxm");
                this._jsxb = GetSafeData.ValidateDataRow_S(dr, "Jsxb");
                this._yxmc = GetSafeData.ValidateDataRow_S(dr, "Yxmc");
                this._zcmc = GetSafeData.ValidateDataRow_S(dr, "Zcmc");
                this._zwlx = GetSafeData.ValidateDataRow_S(dr, "Zwlx");
                this._dlmm = GetSafeData.ValidateDataRow_S(dr, "Dlmm");
                this._zzzt = GetSafeData.ValidateDataRow_B(dr, "Zzzt");

                //解密口令
                this._dlmm  = Encrypt.DecryptString(_dlmm, _jsbh);
                this._exist = true;
            }
            else
            {
                this._exist = false;
            }
        }
Exemple #10
0
    /// <summary>
    /// 重置密码
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    /// <summary>
    protected void btnResPwd_Click(object sender, EventArgs e)
    {
        //随即生成一个字符串,并将用户的密码修改为这个字符串
        ArrayList selectedUsers = GetSelected();

        if (selectedUsers.Count != 1)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('请选择一个用户!');</script>");
            return;
        }

        string czy = selectedUsers[0].ToString();

        Random ran               = new Random();
        string newPassword       = (ran.Next(999999).ToString().PadLeft(6, '8')); //随机生成一个密码
        string encryptedPassword = Encrypt.EncryptString(newPassword, czy);       //加密

        string where = " Where czy = "
                       + Gzl.DataAccessHelper.SqlStringConstructor.GetQuotedString(czy);

        Hashtable ht = new Hashtable();

        ht.Add("Dlmm", SqlStringConstructor.GetQuotedString(encryptedPassword));
        Gzl.BusinessLogicLayer.User.Update(ht, where);

        ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + czy + "的密码已经重置,新密码为【" + newPassword + "】。');</script>");
    }
    protected void btnSure_ServerClick(object sender, EventArgs e)
    {
        string loginName = Session["login_name"].ToString();

        JS js = new JS();

        js.LoadData(loginName);

        if (js.Dlmm != oldPwd.Value)
        {
            Response.Write("<Script Language=JavaScript>alert('旧密码错误,请重新输入');history.go(-1);</Script>");
        }
        else
        {
            string where = "Where jsbh = " + SqlStringConstructor.GetQuotedString(loginName);

            string encryptedPassword = Encrypt.EncryptString(newPwd.Value, loginName);

            Hashtable ht = new Hashtable();

            ht.Add("dlmm", SqlStringConstructor.GetQuotedString(encryptedPassword));

            Gzl.BusinessLogicLayer.JS.Update(ht, where);

            Response.Write("<Script Language=JavaScript>alert(\"修改成功!\");history.go(-1);</Script>");
        }
    }
Exemple #12
0
        /// <summary>
        /// 根据参数kcsjbh,获取课程设计详细信息
        /// </summary>
        /// <param name="kcsjbh">课程设计编号/param>
        public void LoadData(string kcsjbh)
        {
            Database db = new Database();               //实例化一个Database类

            string sql = "";

            sql = "Select * from [kcsjb] where kcsjbh = " + SqlStringConstructor.GetQuotedString(kcsjbh);


            DataRow dr = db.GetDataRow(sql);    //利用Database类的GetDataRow方法查询数据

            //根据查询得到的数据,对成员赋值
            if (dr != null)
            {
                this._kcsjbh = GetSafeData.ValidateDataRow_S(dr, "Kcsjbh");
                this._kcsjmc = GetSafeData.ValidateDataRow_S(dr, "Kcsjmc");
                this._kcsjzs = GetSafeData.ValidateDataRow_S(dr, "Kcsjzs");
                this._yxbz   = GetSafeData.ValidateDataRow_B(dr, "Yxbz");
                this._exist  = true;
            }
            else
            {
                this._exist = false;
            }
        }
Exemple #13
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        Hashtable hashtable = new Hashtable();
        string    value     = this.hdnUserName.Value;

        hashtable.Add("MeetingInfoID", this.MeetingInfoID.ToString());
        hashtable.Add("WaiterCode", SqlStringConstructor.GetQuotedString(this.hdnUserCode.Value));
        hashtable.Add("WaiterName", SqlStringConstructor.GetQuotedString(value.ToString()));
        hashtable.Add("Content", SqlStringConstructor.GetQuotedString(this.txtContent.Text));
        if (this.RecordID == 0)
        {
            if (ConferenceManage.AddTemplateFraeInfo("[OA_Meeting_Waiter]", hashtable))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
        else
        {
            string where = " where RecordId = " + this.RecordID.ToString();
            if (ConferenceManage.UpdTemplateFraeInfo("[OA_Meeting_Waiter]", hashtable, where))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
    }
        /// <summary>
        /// 根据参数Jxbbh,获取教学班详细信息
        /// </summary>
        /// <param name="jxbbh">教学班编号</param>
        public void LoadData(string jsbh, string bysjlx, string kbxn, string kbxq)
        {
            Database db = new Database();               //实例化一个Database类

            string sql = "";

            sql = "Select * from [bysjb],[jsb],[yxb] where [jsb].jsbh = "
                  + SqlStringConstructor.GetQuotedString(jsbh) + " And bysjlx = " + SqlStringConstructor.GetQuotedString(bysjlx) + " And kbxn = " + SqlStringConstructor.GetQuotedString(kbxn) + " And kbxq ="
                  + SqlStringConstructor.GetQuotedString(kbxq) + "And [bysjb].jsbh=[jsb].jsbh And [bysjb].yxbh=[yxb].yxbh";


            DataRow dr = db.GetDataRow(sql);    //利用Database类的GetDataRow方法查询用户数据

            //根据查询得到的数据,对成员赋值
            if (dr != null)
            {
                this._jsxm   = GetSafeData.ValidateDataRow_S(dr, "jsxm");
                this._bysjlx = GetSafeData.ValidateDataRow_S(dr, "bysjlx");
                this._yxmc   = GetSafeData.ValidateDataRow_S(dr, "yxmc");
                this._bysjzs = GetSafeData.ValidateDataRow_F(dr, "bysjzs");
                this._cjrs   = GetSafeData.ValidateDataRow_N(dr, "cjrs");
                this._kbxn   = GetSafeData.ValidateDataRow_S(dr, "kbxn");
                this._kbxq   = GetSafeData.ValidateDataRow_S(dr, "kbxq");
                this._jsbh   = GetSafeData.ValidateDataRow_S(dr, "jsbh");
                this._yxbh   = GetSafeData.ValidateDataRow_S(dr, "yxbh");
                this._exist  = true;
            }
            else
            {
                this._exist = false;
            }
        }
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        Hashtable hashtable = new Hashtable();
        int       num       = 0;

        if (this.txtNumber.Text != "")
        {
            num = Convert.ToInt32(this.txtNumber.Text);
        }
        hashtable.Add("MeetingInfoID", this.MeetingInfoID.ToString());
        hashtable.Add("EquipmentName", SqlStringConstructor.GetQuotedString(this.txtEquipmentName.Text));
        hashtable.Add("Number", num.ToString());
        if (this.RecordID == 0)
        {
            if (ConferenceManage.AddTemplateFraeInfo("[OA_Meeting_Equipment]", hashtable))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
        else
        {
            string where = " where RecordId = " + this.RecordID.ToString();
            if (ConferenceManage.UpdTemplateFraeInfo("[OA_Meeting_Equipment]", hashtable, where))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
    }
        public void LoadDataJXB2(string jxbmc)
        {
            Database db = new Database();               //实例化一个Database类

            string sql = "";

            sql = "Select * from [jxbb] where jxbmc = "
                  + SqlStringConstructor.GetQuotedString(jxbmc);


            DataRow dr = db.GetDataRow(sql);    //利用Database类的GetDataRow方法查询用户数据

            //根据查询得到的数据,对成员赋值
            if (dr != null)
            {
                this._jxbbh  = GetSafeData.ValidateDataRow_S(dr, "jxbbh");
                this._jxbmc  = GetSafeData.ValidateDataRow_S(dr, "jxbmc");
                this._jxbzrs = GetSafeData.ValidateDataRow_S(dr, "jxbzrs");


                this._exist = true;
            }
            else
            {
                this._exist = false;
            }
        }
Exemple #17
0
        /// <summary>
        /// 根据参数loginName,获取用户详细信息
        /// </summary>
        /// <param name="loginName">用户登录名</param>
        public void LoadData(string loginName)
        {
            Database db = new Database();                       //实例化一个Database类

            string sql = "";

            sql = "Select * from [User] where LoginName = "
                  + SqlStringConstructor.GetQuotedString(loginName);

            DataRow dr = db.GetDataRow(sql);            //利用Database类的GetDataRow方法查询用户数据

            //根据查询得到的数据,对成员赋值
            if (dr != null)
            {
                this._userID    = GetSafeData.ValidateDataRow_N(dr, "UserID");
                this._loginName = GetSafeData.ValidateDataRow_S(dr, "loginName");
                this._userName  = GetSafeData.ValidateDataRow_S(dr, "UserName");
                this._password  = GetSafeData.ValidateDataRow_S(dr, "PassWord");
                this._address   = GetSafeData.ValidateDataRow_S(dr, "Address");
                this._zip       = GetSafeData.ValidateDataRow_S(dr, "Zip");

                this._exist = true;
            }
            else
            {
                this._exist = false;
            }
        }
Exemple #18
0
        /// <summary>
        /// 查询专业
        /// </summary>
        /// <param name="queryItems"></param>
        /// <returns></returns>
        public static DataTable QueryZY(Hashtable queryItems)
        {
            int Count = 0;

            string where = "";
            foreach (DictionaryEntry item in queryItems)
            {
                if (Count == 0)
                {
                    where = " Where ";
                }
                else
                {
                    where += " And ";
                }
                if (item.Value.GetType().ToString() == "System.String")
                {
                    where += item.Key.ToString()
                             + " Like "
                             + SqlStringConstructor.GetQuotedString(
                        item.Value.ToString()
                        + "%");
                }
                else
                {
                    where += item.Key.ToString() + "= " + item.Value;
                }
                Count++;
            }

            string   sql = "Select * From [zyb] " + where;
            Database db  = new Database();

            return(db.GetDataTable(sql));
        }
    private void Query()
    {
        Database  db     = new Database();
        DataTable dt     = new DataTable();
        string    strXnd = selSelXnxz.SelectedItem.Text;

        switch (selSelCxfw.Value)
        {
        case "院系编号": dt = db.GetDataTable("exec proYxbhZgzlJs " + SqlStringConstructor.GetQuotedString(txtSelCxnr.Value) + " , " + SqlStringConstructor.GetQuotedString(strXnd)); break;

        case "院系名称": dt = db.GetDataTable("exec proYxmcZgzlJs " + SqlStringConstructor.GetQuotedString(txtSelCxnr.Value) + " , " + SqlStringConstructor.GetQuotedString(strXnd)); break;

        case "教师编号": dt = db.GetDataTable("exec proJsbhZgzlJs " + SqlStringConstructor.GetQuotedString(txtSelCxnr.Value) + " , " + SqlStringConstructor.GetQuotedString(strXnd)); break;

        case "教师姓名": dt = db.GetDataTable("exec proJsxmZgzlJs " + SqlStringConstructor.GetQuotedString(txtSelCxnr.Value) + " , " + SqlStringConstructor.GetQuotedString(strXnd)); break;
        }

        GV.DataSource = dt;
        GV.DataBind();

        labelPage.Text = "查询结果(第" + (GV.PageIndex + 1).ToString() + "页 共" + GV.PageCount.ToString() + "页)";
        foreach (GridViewRow row in GV.Rows)
        {
            row.Cells[8].Attributes.Add("onclick", "window.open('pageJsGzlxx.aspx?jsbh=" + row.Cells[1].Text + "&xnd=" + strXnd + "')");
        }
    }
Exemple #20
0
    /// <summary>
    /// 重置密码
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnRes_ServerClick(object sender, EventArgs e)
    {
        //随即生成一个字符串,并将用户的密码修改为这个字符串
        ArrayList selectedJS = GetSelected();

        if (selectedJS.Count != 1)
        {
            Response.Write("<Script Language=JavaScript>alert('请选择一个教师!');history.go(-1);</Script>");
            return;
        }

        string jsbh = selectedJS[0].ToString();

        Random ran               = new Random();
        string newPassword       = (ran.Next(999999).ToString().PadLeft(6, '8')); //随机生成一个密码
        string encryptedPassword = Encrypt.EncryptString(newPassword, jsbh);      //加密

        string where = " Where jsbh = "
                       + Gzl.DataAccessHelper.SqlStringConstructor.GetQuotedString(jsbh);

        Hashtable ht = new Hashtable();

        ht.Add("Dlmm", SqlStringConstructor.GetQuotedString(encryptedPassword));
        Gzl.BusinessLogicLayer.JS.Update(ht, where);

        ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + jsbh + "的密码已经重置,新密码为【" + newPassword + "】。');</script>");
    }
        public static void DeleteBJ(string jxbbh)
        {
            Database db  = new Database();      //实例化一个Database类
            string   sql = "Delete from [bj_jxb_gxb] where [jxbbh] = "
                           + SqlStringConstructor.GetQuotedString(jxbbh);

            db.ExecuteSQL(sql);
        }
        /// <summary>
        /// 删除班级数据
        /// </summary>
        /// <param name="bjbh">班级编号</param>
        public static void Delete(string bjbh)
        {
            Database db  = new Database();              //实例化一个Database类
            string   sql = "Delete from [bjb] Where [bjbh] = "
                           + SqlStringConstructor.GetQuotedString(bjbh);

            db.ExecuteSQL(sql);
        }
Exemple #23
0
    protected void BtnAdd_Click(object sender, System.EventArgs e)
    {
        System.Collections.Hashtable hashtable = new System.Collections.Hashtable();
        hashtable.Add("NodeID", this.nodeID.ToString());
        hashtable.Add("OrderNumber", this.txtOrder.Text.Trim());
        string pStr;

        if (this.RbAnd.Checked)
        {
            pStr = "1";
        }
        else
        {
            if (this.RbOr.Checked)
            {
                pStr = "0";
            }
            else
            {
                pStr = "";
            }
        }
        hashtable.Add("AndOr", SqlStringConstructor.GetQuotedString(pStr));
        hashtable.Add("ConditionField", SqlStringConstructor.GetQuotedString(this.ddltCondition.SelectedValue.ToString()));
        hashtable.Add("FieldType", SqlStringConstructor.GetQuotedString(this.hdnFieldType.Value));
        hashtable.Add("ConditionType", SqlStringConstructor.GetQuotedString(this.ddltConditionType.SelectedValue.ToString()));
        hashtable.Add("ConditionValue", this.txtConditionValue.Text.Trim());
        DataRow dataRow = FlowTemplateAction.QueryOrderNumberList(this.nodeID, System.Convert.ToInt32(this.txtOrder.Text.Trim()));

        if (dataRow != null)
        {
            if (dataRow["NodeID"].ToString() != "" && dataRow["NodeID"] != null)
            {
                string where = "where NodeId = " + this.nodeID.ToString() + " and OrderNumber = " + this.txtOrder.Text.Trim();
                if (FlowTemplateAction.UpdNodeCondition(hashtable, where))
                {
                    this.JS.Text = "alert('更改成功!');window.returnValue=false;window.close();";
                    return;
                }
            }
            else
            {
                if (FlowTemplateAction.AddNodeCondition(hashtable))
                {
                    this.JS.Text = "alert('增加成功!');window.returnValue=false;window.close();";
                    return;
                }
            }
        }
        else
        {
            if (FlowTemplateAction.AddNodeCondition(hashtable))
            {
                this.JS.Text = "alert('增加成功!');window.returnValue=false;window.close();";
            }
        }
    }
        /// <summary>
        /// 删除实习任务
        /// </summary>
        /// <param name="sxbh"></param>
        public static void Delete(string jsbh, string bysjlx, string kbxn, string kbxq)
        {
            Database db  = new Database();              //实例化一个Database类
            string   sql = "Delete from [bysjb] Where [jsbh] ="
                           + SqlStringConstructor.GetQuotedString(jsbh) + " And [bysjlx] = " + SqlStringConstructor.GetQuotedString(bysjlx)
                           + " And [kbxn] = " + SqlStringConstructor.GetQuotedString(kbxn) + " And [kbxq] = "
                           + SqlStringConstructor.GetQuotedString(kbxq);

            db.ExecuteSQL(sql);
        }
Exemple #25
0
        /// <summary>
        /// 删除课程设计任务
        /// </summary>
        /// <param name="sxbh"></param>
        public static void Delete(string jsbh, string kcsjmc, string jxbmc, string kbxn, string kbxq)
        {
            Database db  = new Database();              //实例化一个Database类
            string   sql = "Delete from [js_kcsj_gxb] Where [jsbh] = "
                           + SqlStringConstructor.GetQuotedString(jsbh) + " And [kcsjbh] = (select kcsjbh from [kcsjb] where kcsjmc = "
                           + SqlStringConstructor.GetQuotedString(kcsjmc) + ") And [jxbbh] = (select jxbbh from [jxbb] where jxbmc = " + SqlStringConstructor.GetQuotedString(jxbmc)
                           + ") And [kbxn] = " + SqlStringConstructor.GetQuotedString(kbxn) + " And [kbxq] = " + SqlStringConstructor.GetQuotedString(kbxq);

            db.ExecuteSQL(sql);
        }
    private void addFlowChart_top1()
    {
        int rowNum = 1;

        System.Collections.Hashtable hashtable = new System.Collections.Hashtable();
        hashtable.Add("TemplateID", this.TemplateID.ToString());
        hashtable.Add("RowNum", rowNum.ToString());
        hashtable.Add("Column1", SqlStringConstructor.GetQuotedString("1;0;开始"));
        FlowTemplateAction.QueryFlowChart_top1(this.TemplateID, rowNum);
    }
    /// <summary>
    /// “保存”按钮单击事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_ServerClick(object sender, EventArgs e)
    {
        if (btnAdd.Disabled == true)
        {
            if (Gzl.BusinessLogicLayer.YX.HasYX(txtYxbh.Value.Trim()))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('院系编号已存在!');</script>");
                txtYxbh.Value = "";
                txtYxmc.Value = "";
            }
            else
            {
                //构造YX信息哈希表
                Hashtable hash = new Hashtable();
                hash.Add("yxbh", SqlStringConstructor.GetQuotedString(txtYxbh.Value.Trim()));
                hash.Add("yxmc", SqlStringConstructor.GetQuotedString(txtYxmc.Value.Trim()));
                hash.Add("yxbz", Convert.ToInt32(selYxbz.Value));

                Gzl.BusinessLogicLayer.YX.Add(hash);
                txtYxbh.Value      = "";
                txtYxmc.Value      = "";
                txtYxbh.Disabled   = true;
                txtYxmc.Disabled   = true;
                selYxbz.Disabled   = true;
                btnAdd.Disabled    = false;
                btnSave.Disabled   = true;
                btnCancel.Disabled = true;
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('添加成功');</script>");
                Query();
            }
        }

        if (btnChag.Disabled == true)
        {
            Hashtable ht = new Hashtable();

            ht.Add("yxmc", SqlStringConstructor.GetQuotedString(txtYxmc.Value.Trim()));
            ht.Add("yxbz", Convert.ToInt32(selYxbz.Value));

            string where = "Where yxbh = " + SqlStringConstructor.GetQuotedString(txtYxbh.Value);
            Gzl.BusinessLogicLayer.YX.Update(ht, where);

            txtYxbh.Value      = "";
            txtYxmc.Value      = "";
            btnSave.Disabled   = true;
            btnCancel.Disabled = true;
            btnChag.Disabled   = false;
            txtYxbh.Disabled   = true;
            txtYxmc.Disabled   = true;
            selYxbz.Disabled   = true;
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('修改成功');</script>");
            Query();
        }
    }
Exemple #28
0
        /// <summary>
        /// 删除实习任务
        /// </summary>
        /// <param name="sxbh"></param>
        public static void Delete(string jsbh, string bjmc, string sxlx, string kbxn, string kbxq)
        {
            Database db  = new Database();              //实例化一个Database类
            string   sql = "Delete from [sxb] Where [jsbh] ="
                           + SqlStringConstructor.GetQuotedString(jsbh) + " And [bjbh] = (select bjbh from [bjb] where bjmc = "
                           + SqlStringConstructor.GetQuotedString(bjmc) + ") And [sxlx] = " + SqlStringConstructor.GetQuotedString(sxlx)
                           + " And [kbxn] = " + SqlStringConstructor.GetQuotedString(kbxn) + " And [kbxq] = "
                           + SqlStringConstructor.GetQuotedString(kbxq);

            db.ExecuteSQL(sql);
        }
Exemple #29
0
    private void Query()
    {
        Database  db     = new Database();
        DataTable dt     = new DataTable();
        string    strXnd = selXnxz.SelectedItem.Text;

        dt = db.GetDataTable("exec proYxGzlBb " + SqlStringConstructor.GetQuotedString(strXnd) + " , " + SqlStringConstructor.GetQuotedString(selYxmc.Value));

        GV.DataSource = dt;
        GV.DataBind();
    }
        /// <summary>
        /// 根据参数Jxbbh,获取教学班详细信息
        /// </summary>
        /// <param name="jxbbh">教学班编号</param>
        public static DataTable LoadDataGX(string jxbbh)
        {
            Database db = new Database();               //实例化一个Database类

            string sql = "";

            sql = "Select * from [bj_jxb_gxb],[bjb] where jxbbh = "
                  + SqlStringConstructor.GetQuotedString(jxbbh)
                  + " And [bj_jxb_gxb].bjbh=[bjb].bjbh ";

            return(db.GetDataTable(sql));
        }