예제 #1
0
    protected void btMod_Click(object sender, System.EventArgs e)
    {
        string       text         = this.tbOldPwd.Text;
        string       text2        = this.tbNewPwd1.Text;
        string       text3        = this.tbNewPwd2.Text;
        userManageDb userManageDb = new userManageDb();
        string       userLoginPwd = userManageDb.GetCurrentUserInfo().UserLoginPwd;

        if (!(text == userLoginPwd))
        {
            this.js.Text = "top.ui.alert('您输入的旧密码不正确,请重新输入!');";
            return;
        }
        if (!(text2 == text3))
        {
            this.js.Text = "top.ui.alert('您两次输入的新密码不相同,请重新输入!');";
            return;
        }
        if (userManageDb.updateUserAuditPwd(this.Page.Session["yhdm"].ToString(), text2.ToString()))
        {
            this.js.Text = "top.ui.show('审核密码修改成功,下次审核请使用新密码!');";
            return;
        }
        this.js.Text = "top.ui.alert('审核密码修改未成功,请重试!');";
    }
예제 #2
0
    protected void btMod_Click(object sender, EventArgs e)
    {
        string text  = this.tbNewPwd1.Text;
        string text2 = this.tbNewPwd2.Text;
        string text3;

        if (this.FUFilePath.HasFile)
        {
            HttpPostedFile postedFile = this.FUFilePath.PostedFile;
            com.jwsoft.pm.entpm.action.FileUpload fileUpload = new com.jwsoft.pm.entpm.action.FileUpload();
            string[] array = fileUpload.Upload(postedFile, 1);
            text3 = array[1].ToString();
        }
        else
        {
            text3 = this.ImageName;
        }
        userManageDb userManageDb = new userManageDb();

        if (!(text == text2))
        {
            this.js.Text = "alert('您两次输入的新密码不相同,请重新输入!');";
            return;
        }
        if (userManageDb.updateUserAuditPwd(this.Page.Session["yhdm"].ToString(), text.ToString(), text3))
        {
            this.js.Text          = "alert('密码修改成功,下次审核请使用新密码!');";
            this.ImgName.ImageUrl = text3;
            return;
        }
        this.js.Text = "alert('密码修改未成功,请重试!');";
    }
예제 #3
0
    protected void btMod_Click(object sender, System.EventArgs e)
    {
        string       text         = this.tbNewPwd1.Text;
        string       arg_17_0     = this.tbNewPwd2.Text;
        userManageDb userManageDb = new userManageDb();

        string[] array = this.hiddenuser.Value.Split(new char[44]);
        if (array.Length > 0)
        {
            for (int i = 0; i < array.Length; i++)
            {
                userManageDb.updateUserAuditPwd(array[i], text.ToString());
            }
        }
        this.js.Text = "alert('审核密码修改成功,下次审核请使用新密码!');window.close();";
    }
예제 #4
0
    private void BtnAdd_Click(object sender, System.EventArgs e)
    {
        string text     = StringHelper.FilterSpecial(this.txtNodeName.Text.Trim());
        string arg_21_0 = this.hdnOperater.Value;
        string pStr     = "";

        if (this.rbSingle.Checked)
        {
            pStr = "1";
        }
        if (this.rbMilti.Checked)
        {
            pStr = "2";
        }
        if (this.rbGroup.Checked)
        {
            pStr = "3";
        }
        if (this.rbItem.Checked)
        {
            pStr = "4";
        }
        if (this.rbDept.Checked)
        {
            pStr = "5";
        }
        string pStr2 = "1";
        string pStr3;

        if (this.rbIsAllPass1.Checked)
        {
            pStr3 = "1";
        }
        else
        {
            pStr3 = "0";
        }
        string pStr4;

        if (this.CkbIsSec.Checked)
        {
            pStr4 = "1";
            userManageDb userManageDb = new userManageDb();
            string[]     array        = this.hdnOperater.Value.Split(new char[44]);
            if (array.Length > 0)
            {
                for (int i = 0; i < array.Length; i++)
                {
                    DataTable auditPwd = userManageDb.GetAuditPwd(array[i]);
                    if (auditPwd.Rows.Count > 0)
                    {
                        auditPwd.Rows[0]["AuditPwd"].ToString();
                        if (string.IsNullOrEmpty(auditPwd.Rows[0]["AuditPwd"].ToString()))
                        {
                            userManageDb.updateUserAuditPwd(array[i], "easy");
                        }
                    }
                }
            }
        }
        else
        {
            pStr4 = "0";
        }
        string pStr5;

        if (this.CkbIsSelReceiver.Checked)
        {
            pStr5 = "1";
        }
        else
        {
            pStr5 = "0";
        }
        string text2 = this.txtRemark.Text;
        string value = this.hdnFrontNode.Value;

        System.Collections.Hashtable hashtable = new System.Collections.Hashtable();
        hashtable.Add("TemplateID", this.TemplateID.ToString());
        hashtable.Add("NodeName", SqlStringConstructor.GetQuotedString(text));
        hashtable.Add("Operater", SqlStringConstructor.GetQuotedString(this.hdnOperater.Value));
        hashtable.Add("AuditorType", SqlStringConstructor.GetQuotedString(pStr));
        hashtable.Add("IsSendMsg", SqlStringConstructor.GetQuotedString(pStr2));
        hashtable.Add("IsAllPass", SqlStringConstructor.GetQuotedString(pStr3));
        hashtable.Add("ConditionDescription", SqlStringConstructor.GetQuotedString(text2));
        hashtable.Add("During", this.txtDuring.Text.Trim());
        hashtable.Add("FrontNode", SqlStringConstructor.GetQuotedString(value));
        hashtable.Add("IsSecValidate", SqlStringConstructor.GetQuotedString(pStr4));
        hashtable.Add("IsSelReceiver", SqlStringConstructor.GetQuotedString(pStr5));
        hashtable.Add("AuditMain", SqlStringConstructor.GetQuotedString(this.txtAuditMain.Text));
        hashtable.Add("DueMode", SqlStringConstructor.GetQuotedString(this.RbDueMode.SelectedValue));
        hashtable.Add("DepCode", SqlStringConstructor.GetQuotedString(this.hfldDep.Value));
        hashtable.Add("Id", SqlStringConstructor.GetQuotedString(System.Guid.NewGuid().ToString()));
        string pos = this.hdnPos.Value.ToString();

        if (!this.CkbIsSelReceiver.Checked)
        {
            if (text != "" && this.hdnOperater.Value.ToString().Trim() != "" && this.txtDuring.Text.ToString().Trim() != "")
            {
                if (this.NodeID != 0)
                {
                    string where = " Where NodeID = " + this.NodeID.ToString();
                    if (FlowTemplateAction.UpdNode(hashtable, where) && FlowChartAction.UpdateFlowChart(this.xpos, this.ypos, pos, this.FrontNodeOld, value, this.NodeID, this.TemplateID, text, text2, this.types))
                    {
                        base.RegisterScript("top.ui.winSuccess({ parentName: '_flowchart' });");
                        return;
                    }
                }
                else
                {
                    object obj = FlowTemplateAction.AddNode(hashtable);
                    if (obj != null)
                    {
                        int    num       = System.Convert.ToInt32(obj);
                        string sqlString = string.Concat(new object[]
                        {
                            "SELECT * FROM WF_TemplateNode WHERE FrontNode='",
                            value,
                            "' AND TemplateID=",
                            this.TemplateID,
                            " AND NodeID !=",
                            num,
                            " "
                        });
                        DataTable dataTable = publicDbOpClass.DataTableQuary(sqlString);
                        if (dataTable.Rows.Count > 0)
                        {
                            string sqlString2 = string.Concat(new object[]
                            {
                                " UPDATE WF_TemplateNode SET FrontNode=",
                                num,
                                " WHERE FrontNode='",
                                value,
                                "' AND TemplateID=",
                                this.TemplateID,
                                " AND NodeID !=",
                                num,
                                " "
                            });
                            bool flag = publicDbOpClass.NonQuerySqlString(sqlString2);
                            if (flag && FlowChartAction.CreateNewFlowChart(this.xpos, this.ypos, this.FrontNode.ToString(), num, this.TemplateID, text, this.types))
                            {
                                base.RegisterScript("top.ui.winSuccess({ parentName: '_flowchart' });");
                                return;
                            }
                        }
                        else
                        {
                            if (FlowChartAction.CreateNewFlowChart(this.xpos, this.ypos, this.FrontNode.ToString(), num, this.TemplateID, text, this.types))
                            {
                                base.RegisterScript("top.ui.winSuccess({ parentName: '_flowchart' });");
                                return;
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (text != "" && this.txtDuring.Text.ToString().Trim() != "")
            {
                if (this.NodeID != 0)
                {
                    string where2 = " Where NodeID = " + this.NodeID.ToString();
                    if (FlowTemplateAction.UpdNode(hashtable, where2) && FlowChartAction.UpdateFlowChart(this.xpos, this.ypos, pos, this.FrontNodeOld, value, this.NodeID, this.TemplateID, text, text2, this.types))
                    {
                        base.RegisterScript("top.ui.winSuccess({ parentName: '_flowchart' });");
                        return;
                    }
                }
                else
                {
                    object obj2 = FlowTemplateAction.AddNode(hashtable);
                    if (obj2 != null)
                    {
                        int num2 = System.Convert.ToInt32(obj2);
                        value.IndexOf(",");
                        string sqlString3 = string.Concat(new object[]
                        {
                            "SELECT * FROM WF_TemplateNode WHERE FrontNode='",
                            value,
                            "' AND TemplateID=",
                            this.TemplateID,
                            " AND NodeID !=",
                            num2,
                            " "
                        });
                        DataTable dataTable2 = publicDbOpClass.DataTableQuary(sqlString3);
                        if (dataTable2.Rows.Count > 0)
                        {
                            string sqlString4 = string.Concat(new object[]
                            {
                                " UPDATE WF_TemplateNode SET FrontNode=",
                                num2,
                                " WHERE FrontNode='",
                                value,
                                "' AND TemplateID=",
                                this.TemplateID,
                                " AND NodeID !=",
                                num2,
                                " "
                            });
                            bool flag2 = publicDbOpClass.NonQuerySqlString(sqlString4);
                            if (flag2 && FlowChartAction.CreateNewFlowChart(this.xpos, this.ypos, this.FrontNode.ToString(), num2, this.TemplateID, text, this.types))
                            {
                                base.RegisterScript("top.ui.winSuccess({ parentName: '_flowchart' });");
                                return;
                            }
                        }
                        else
                        {
                            if (FlowChartAction.CreateNewFlowChart(this.xpos, this.ypos, this.FrontNode.ToString(), num2, this.TemplateID, text, this.types))
                            {
                                base.RegisterScript("top.ui.winSuccess({ parentName: '_flowchart' });");
                            }
                        }
                    }
                }
            }
        }
    }