예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (base.Request["pc"] == null)
     {
         this.JS.Text = "alert('参数错误!');history.go(-1);";
         return;
     }
     if (!base.IsPostBack)
     {
         userManageDb userManageDb = new userManageDb();
         this.TxtRecordPerson.Text      = userManageDb.GetUserName(this.Session["yhdm"].ToString());
         this.ViewState["TaskBookCode"] = Guid.NewGuid().ToString();
         this.ViewState["UserCode"]     = userManageDb.GetCurrentUserInfo().UserCode;
         TaskBookAction.DeleteTempResource(this.ViewState["UserCode"].ToString());
         this.ProjectCode                      = new Guid(base.Request["pc"]);
         this.HdnProjectCode.Value             = this.ProjectCode.ToString();
         this.DbConstructDate.Text             = DateTime.Now.ToShortDateString();
         this.BtnPickWBS.Attributes["onclick"] = "javascript:return OpenPickWBS('" + this.ProjectCode.ToString() + "');";
         this.TaskBind(new DataTable());
     }
     this.RecordCode     = this.ViewState["TaskBookCode"].ToString();
     this.FileLink1.MID  = 29;
     this.FileLink1.FID  = this.RecordCode;
     this.FileLink1.Type = 1;
 }
예제 #2
0
    private void GetMsgDB(int ic)
    {
        DataTable auditUser = FlowAuditAction.GetAuditUser(ic);

        if (auditUser.Rows.Count > 0)
        {
            for (int i = 0; i < auditUser.Rows.Count; i++)
            {
                if (auditUser.Rows[i]["Operator"].ToString() != "")
                {
                    string       xgid         = auditUser.Rows[i]["ID"].ToString();
                    string       text         = "您需要审核:";
                    string       jsyhdm       = auditUser.Rows[i]["Operator"].ToString();
                    userManageDb userManageDb = new userManageDb();
                    text = text + userManageDb.GetUserName(auditUser.Rows[i]["Organiger"].ToString()) + "发起的" + auditUser.Rows[i]["BusinessClassName"].ToString();
                    if (this.ckbIsSendInfo.Checked)
                    {
                        this.getPTDBSJ(xgid, text, jsyhdm);
                    }
                    if (this.ckbIsSendMsg.Checked)
                    {
                        this.GetSms(xgid, text, jsyhdm);
                    }
                }
            }
        }
    }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.strSkinPath = "skin" + this.Session["SkinID"].ToString();
     if (!this.Page.IsPostBack)
     {
         if (this.Session["yhdm"] != null)
         {
             userManageDb userManageDb = new userManageDb();
             Label        expr_56      = this.l_name;
             expr_56.Text   += userManageDb.GetUserName(this.Session["yhdm"].ToString());
             this.lb_cs.Text = "              登录次数:" + this.Session["ptcs"].ToString();
             if (base.Application["UserCodeCollection"] != null)
             {
                 this.l_num.Text = " " + ((DataTable)base.Application["UserCodeCollection"]).Rows.Count.ToString() + " ";
             }
             else
             {
                 this.l_num.Text = " 0 ";
             }
         }
         if (this.l_num.Text == " 0 ")
         {
             this.l_state.Text = "状态 :\u3000脱机";
         }
     }
 }
예제 #4
0
파일: human.aspx.cs 프로젝트: zxl881203/src
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         int num = 0;
         try
         {
             num = int.Parse(base.Request.QueryString["deptid"].ToString());
         }
         catch
         {
         }
         if (num != 0 && num != 1)
         {
             userManageDb userManageDb = new userManageDb();
             DataSet      dataSet      = userManageDb.DepUserQuaryForMail(num.ToString());
             DataTable    dataTable    = dataSet.Tables[0];
             this.LBoxHuman.Items.Clear();
             for (int i = 0; i < dataTable.Rows.Count; i++)
             {
                 ListItem item = new ListItem(dataTable.Rows[i]["v_xm"].ToString(), dataTable.Rows[i]["v_yhdm"].ToString());
                 this.LBoxHuman.Items.Add(item);
             }
         }
         this.SelectedList_Restore();
     }
 }
예제 #5
0
    private void PageBind()
    {
        OACalendarInfo model = this.cia.GetModel(this.RecordID);

        this.TxtRecordDate.Text = Convert.ToDateTime(model.RecordDate).ToString("yyyy-MM-dd");
        this.TxtContent.Text    = model.Content;
        this.TxtTitle.Text      = model.Title;
        userManageDb userManageDb = new userManageDb();

        this.TxtUserName.Text   = userManageDb.GetUserName(model.UserCode);
        this.CBIsRemind.Checked = (model.IsRemind == "1");
        if (!this.CBIsRemind.Checked)
        {
            this.CBIsSms.Enabled     = false;
            this.CBIsMessage.Enabled = false;
        }
        this.InfoGuid = model.InfoGuid;
        CalendarRemindSetaction calendarRemindSetaction = new CalendarRemindSetaction();
        OACalendarRemindSet     model2 = calendarRemindSetaction.GetModel(this.InfoGuid);

        if (model2 != null)
        {
            this.TxtHours.Text       = model2.RemindHour.ToString();
            this.TxtMinutes.Text     = model2.RemindMinute.ToString();
            this.CBIsMessage.Checked = (model2.IsMessage == "1");
            this.CBIsSms.Checked     = (model2.IsSms == "1");
            return;
        }
        this.CBIsMessage.Checked = false;
        this.CBIsSms.Checked     = false;
    }
예제 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.LinkButton1.Attributes["onclick"]   = "showAnnex();return false;";
        this.TBoxConsignee.Attributes["onclick"] = "getWhereForc(1);return false;";
        this.txtCopy.Attributes["onclick"]       = "getWhereForc(2);return false;";
        this.txtSecret.Attributes["onclick"]     = "getWhereForc(3);return false;";
        this._iSysID        = int.Parse(this.Session["SysID"].ToString());
        this._strSenderCode = this.Session["yhdm"].ToString();
        userManageDb userManageDb = new userManageDb();

        this._strSenderName = userManageDb.GetUserName(this._strSenderCode);
        if (!base.IsPostBack)
        {
            this.Session["System"]     = "";
            this.Session["HumanCode"]  = "";
            this.Session["HumanName"]  = "";
            this.Session["HumanCode2"] = "";
            this.Session["HumanName2"] = "";
            this.Session["HumanCode3"] = "";
            this.Session["HumanName3"] = "";
            this.DelTempAnnex(this._strSenderCode);
            this.bindtree();
            this.BindTree2();
        }
        this.TBoxConsignee.Text = this.Session["HumanName"].ToString();
    }
예제 #7
0
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType != DataControlRowType.Pager)
     {
         e.Row.Cells[0].Attributes["style"] = "display:none";
     }
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
         string text  = this.GridView1.DataKeys[e.Row.RowIndex]["RecordID"].ToString();
         string text2 = ((DataRowView)e.Row.DataItem)["State"].ToString();
         string text3 = ((DataRowView)e.Row.DataItem)["ManagerCode"].ToString();
         e.Row.Attributes["onclick"] = string.Concat(new string[]
         {
             "OnRecord(this);ClickRow('",
             text,
             "','",
             text2,
             "','",
             text3,
             "');this.cells[0].childNodes[0].click();"
         });
         userManageDb userManageDb = new userManageDb();
         e.Row.Cells[10].Text = userManageDb.GetUserName(((DataRowView)e.Row.DataItem)["UserCode"].ToString());
     }
 }
예제 #8
0
    protected DataTable FormateExportTable(DataTable dt2)
    {
        DataTable dataTable = new DataTable();

        dataTable.Columns.Add("姓名", typeof(string));
        dataTable.Columns.Add("迟到", typeof(string));
        dataTable.Columns.Add("早退", typeof(string));
        dataTable.Columns.Add("事假", typeof(string));
        dataTable.Columns.Add("带薪年假", typeof(string));
        dataTable.Columns.Add("带薪婚假", typeof(string));
        dataTable.Columns.Add("工伤", typeof(string));
        dataTable.Columns.Add("病假", typeof(string));
        dataTable.Columns.Add("产假", typeof(string));
        dataTable.Columns.Add("丧假", typeof(string));
        userManageDb userManageDb = new userManageDb();

        for (int i = 0; i < dt2.Rows.Count; i++)
        {
            DataRow dataRow = dataTable.NewRow();
            dataRow["姓名"]   = userManageDb.GetUserName(dt2.Rows[i]["UserCode"].ToString());
            dataRow["迟到"]   = dt2.Rows[i]["Later"].ToString();
            dataRow["早退"]   = dt2.Rows[i]["LeaveEarly"].ToString();
            dataRow["事假"]   = dt2.Rows[i]["Holiday1"].ToString();
            dataRow["带薪年假"] = dt2.Rows[i]["Holiday3"].ToString();
            dataRow["带薪婚假"] = dt2.Rows[i]["Holiday2"].ToString();
            dataRow["工伤"]   = dt2.Rows[i]["Holiday4"].ToString();
            dataRow["病假"]   = dt2.Rows[i]["Holiday5"].ToString();
            dataRow["产假"]   = dt2.Rows[i]["Holiday6"].ToString();
            dataRow["丧假"]   = dt2.Rows[i]["Holiday7"].ToString();
            dataTable.Rows.Add(dataRow);
        }
        return(dataTable);
    }
예제 #9
0
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
         string str = ((DataRowView)e.Row.DataItem)["RecordID"].ToString();
         e.Row.Attributes["onclick"] = "OnRecord(this);ClickRow('" + str + "');";
         userManageDb userManageDb = new userManageDb();
         e.Row.Cells[2].Text = userManageDb.GetUserName(e.Row.Cells[2].Text);
         string text;
         if ((text = e.Row.Cells[6].Text) != null)
         {
             if (text == "1")
             {
                 e.Row.Cells[6].Text = "秘密";
                 return;
             }
             if (text == "2")
             {
                 e.Row.Cells[6].Text = "机密";
                 return;
             }
             if (!(text == "3"))
             {
                 return;
             }
             e.Row.Cells[6].Text = "绝密";
         }
     }
 }
예제 #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.Response.Cache.SetNoStore();
     if (!this.Page.IsPostBack)
     {
         this.UserCode          = this.Session["yhdm"].ToString();
         this.hdnUserCode.Value = this.Session["yhdm"].ToString();
         userManageDb userManageDb = new userManageDb();
         this.txtUserName.Text = userManageDb.GetUserName(this.Session["yhdm"].ToString());
         this.RecordId         = Convert.ToInt32(base.Request.QueryString["mid"]);
         if (this.RecordId != 0)
         {
             this.setData(this.RecordId);
             this.hdnRecordId.Value = this.RecordId.ToString();
         }
         else
         {
             object obj = publicDbOpClass.QuaryMaxid("OA_MeetingRoom_Apply", "RecordID");
             if (obj == null)
             {
                 this.hdnRecordId.Value = "1";
             }
             else
             {
                 int num = Convert.ToInt32(obj) + 1;
                 this.hdnRecordId.Value = num.ToString();
             }
         }
         this.SqlEquipment.DataBind();
         this.gvEquipment.DataBind();
         this.BtnSelect.Attributes["onclick"] = "javascript:pickEquipment()";
     }
 }
예제 #11
0
    protected void lbRecycle_Click(object sender, EventArgs e)
    {
        if (this._DeptCode == null)
        {
            return;
        }
        this.dgUserList.Visible    = false;
        this.lbRecycle.Visible     = false;
        this.dgInvalidUser.Visible = true;
        this.lbUserList.Visible    = true;
        this.btnSure.Visible       = true;
        userManageDb userManageDb = new userManageDb();
        string       text         = userManageDb.depName(this._DeptCode);
        DataTable    dataTable    = userManageDb.depUserList(this._DeptCode, "n");

        this.dgInvalidUser.DataSource = dataTable;
        this.dgInvalidUser.DataBind();
        if (this._DeptCode == "0")
        {
            this.lblCaption.Text = "共有<font color=red> " + dataTable.Rows.Count + " </font>个用户";
            return;
        }
        this.lblCaption.Text = string.Concat(new object[]
        {
            "<font color=red> ",
            text,
            " 的冻结账号列表中</font>共有<font color=red> ",
            dataTable.Rows.Count,
            " </font>个用户"
        });
    }
예제 #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManageDb userManageDb = new userManageDb();

        if (this.Page.Request.Params["code"] == null)
        {
            this._DeptCode = "1";
        }
        else
        {
            if (this.Page.Request.Params["code"] != null)
            {
                this._DeptCode = this.Page.Request.Params["code"].ToString();
            }
        }
        if (!this.Page.IsPostBack)
        {
            string a = this.Session["yhdm"].ToString();
            if (a != "00000000")
            {
                this.dgUserList.DataSource = "";
                return;
            }
            string    str        = userManageDb.depName(this._DeptCode);
            DataTable dataSource = userManageDb.depManagerList(this._DeptCode, "y");
            this.dgUserList.DataSource = dataSource;
            this.dgUserList.DataBind();
            this.lblCaption.Text = "<font color=red> " + str + " </font>";
        }
    }
예제 #13
0
 protected void btnSure_Click(object sender, EventArgs e)
 {
     try
     {
         for (int i = 0; i < this.dgInvalidUser.Items.Count; i++)
         {
             CheckBox checkBox = this.dgInvalidUser.Items[i].FindControl("chbSure") as CheckBox;
             if (checkBox.Checked)
             {
                 string       text         = this.dgInvalidUser.DataKeys[i].ToString();
                 userManageDb userManageDb = new userManageDb();
                 userManageDb.userUpdate(text, "y");
                 userManageDb.InsertRTXSynchronization(text, "y");
                 userManageDb.UpdateUserPriv(text);
             }
         }
         userManageDb userManageDb2 = new userManageDb();
         userManageDb2.depName(this._DeptCode);
         DataTable dataSource = userManageDb2.depUserList(this._DeptCode, "n");
         this.dgInvalidUser.DataSource = dataSource;
         this.dgInvalidUser.DataBind();
     }
     catch
     {
         this.js.Text = "alert('启用失败!');window.close();";
     }
 }
예제 #14
0
    private void dgUserList_DeleteCommand(object source, DataGridCommandEventArgs e)
    {
        string       text         = this.dgUserList.DataKeys[e.Item.ItemIndex].ToString();
        userManageDb userManageDb = new userManageDb();
        bool         flag         = userManageDb.userUpdate(text, "n");

        flag = userManageDb.InsertRTXSynchronization(text, "n");
        if (flag)
        {
            this.js.Text = "top.ui.show('冻结成功!');";
            string    text2     = userManageDb.depName(this._DeptCode);
            DataTable dataTable = userManageDb.depUserList(this._DeptCode, "y");
            this.dgUserList.DataSource = dataTable;
            this.dgUserList.DataBind();
            this.lblCaption.Text = string.Concat(new object[]
            {
                "<font color=red> ",
                text2,
                " </font>共有<font color=red> ",
                dataTable.Rows.Count,
                " </font>个用户"
            });
            return;
        }
        this.js.Text = "top.ui.alert('" + userManageDb.MessageString + "');";
    }
예제 #15
0
    protected void DataBindToPage()
    {
        IntendanceMaster   intendanceMaster = this.intendanceMasterAction.GetIntendanceMaster(this.IntendanceGuid);
        EPM_IntendanceInfo model            = this.IntendanceInfoAction.GetModel(this.IntendanceGuid);
        userManageDb       userManageDb     = new userManageDb();

        if (this.opType != "v" && this.opType != "add")
        {
            this.txtQuestionTitle.Text = intendanceMaster.QuestionTitle;
            this.txtDate.Text          = intendanceMaster.BookInDate.ToString("yyyy-MM-dd");
            this.ddlType.SelectedValue = intendanceMaster.QuestionTypeId.ToString();
            this.txtPerson.Value       = WebUtil.GetUserNamesComma(intendanceMaster.SettleYhdm);
            this.ManagerCode.Value     = intendanceMaster.SettleYhdm;
            this.txtQuestion.Text      = model.QuestionExplain;
            this.InfoGuid = model.NoteId;
            return;
        }
        if (this.opType == "v")
        {
            this.lbltype.Visible          = true;
            this.lblQuestionTitle.Visible = true;
            this.lblDate.Visible          = true;
            this.txtDate.Visible          = false;
            this.ddlType.Visible          = false;
            this.txtPerson.Visible        = false;
            this.txtQuestionTitle.Visible = false;
            this.Img3.Visible             = false;
            this.lblQuestionTitle.Text    = intendanceMaster.QuestionTitle;
            this.lblDate.Text             = intendanceMaster.BookInDate.ToString("yyyy-MM-dd");
            this.lbltype.Text             = this.intendanceMasterAction.GetQuestionNameById(intendanceMaster.QuestionTypeId);
            this.lblPerson.Text           = userManageDb.GetUserName(intendanceMaster.SettleYhdm);
            this.InfoGuid = model.NoteId;
        }
    }
예제 #16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         if (!string.IsNullOrEmpty(base.Request.QueryString["code"]))
         {
             this.DataBindContractType();
         }
         else
         {
             this.iiTypeC();
         }
         CreatDepTree creatDepTree = new CreatDepTree(this.tvDept.Nodes);
         creatDepTree.EnabledLink   = true;
         creatDepTree.NavigationURL = "Oauser.aspx";
         userManageDb userManageDb = new userManageDb();
         string       a            = userManageDb.manageDept(this.Session["yhdm"].ToString()).Trim();
         if (a == "1")
         {
             creatDepTree.BuildTreeView(this.Page.Session["yhdm"].ToString(), 0);
         }
         if (this.tvDept.Nodes.Count > 0)
         {
             this.tvDept.Nodes[0].Selected = true;
         }
     }
 }
예제 #17
0
 protected void GVConfirm_DataBound(object sender, System.EventArgs e)
 {
     for (int i = 0; i < this.GVConfirm.Rows.Count; i++)
     {
         if (this.GVConfirm.Rows[i].Cells[6].Text.Trim() != "已销假" && this.GVConfirm.Rows[i].Cells[3].Text != "")
         {
             System.DateTime t = System.DateTime.Parse(this.GVConfirm.Rows[i].Cells[3].Text);
             if (this.GVConfirm.DataKeys[i].Values["Days"].ToString() != "" && this.GVConfirm.DataKeys[i].Values["Days"].ToString() != null)
             {
                 t.AddDays(System.Math.Ceiling(System.Convert.ToDouble(this.GVConfirm.DataKeys[i].Values["Days"].ToString())));
             }
             System.DateTime t2 = System.Convert.ToDateTime(System.DateTime.Now.ToShortDateString());
             if (t < t2)
             {
                 HRLeaveApplication hRLeaveApplication = new HRLeaveApplication();
                 hRLeaveApplication.RecordID  = (System.Guid) this.GVConfirm.DataKeys[i].Values["RecordID"];
                 hRLeaveApplication.IsConfirm = "1";
                 hRLeaveApplication.LeaveDays = System.Convert.ToDecimal(this.GVConfirm.DataKeys[i].Values["Days"].ToString());
                 userManageDb userManageDb = new userManageDb();
                 hRLeaveApplication.ConfirmUser = userManageDb.GetUserName(this.Session["yhdm"].ToString());
                 this.AA.AnnulConfirmUpdate(hRLeaveApplication);
             }
         }
     }
 }
예제 #18
0
    protected void GetPageBind()
    {
        DataTable list = this.rma.GetList(string.Concat(new object[]
        {
            "RecieveUsercode = '",
            this.Session["yhdm"].ToString(),
            "' and InstanceCode = '",
            this.InstanceCode,
            "'"
        }));
        string       text         = "";
        string       text2        = "";
        string       text3        = "";
        userManageDb userManageDb = new userManageDb();

        for (int i = 0; i < list.Rows.Count; i++)
        {
            text  = text + userManageDb.GetUserName(list.Rows[i]["v_yhdm"].ToString()) + ",";
            text2 = text2 + list.Rows[i]["v_yhdm"].ToString() + ",";
            text3 = list.Rows[i]["LookUrl"].ToString();
        }
        if (text != "")
        {
            this.txtAnnouncer.Text  = text.Remove(text.Length - 1);
            this.hdnAnnouncer.Value = text2.Remove(text2.Length - 1);
            this.txtContent.Text    = text3;
        }
    }
예제 #19
0
 protected void GVSelecteFile_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
         ((DataRowView)e.Row.DataItem)["RecordID"].ToString();
         e.Row.Attributes["onclick"] = "OnRecord(this);";
         userManageDb userManageDb = new userManageDb();
         e.Row.Cells[3].Text = userManageDb.GetUserName(e.Row.Cells[3].Text);
         string text;
         if ((text = e.Row.Cells[7].Text) != null)
         {
             if (!(text == "1"))
             {
                 if (!(text == "2"))
                 {
                     if (text == "3")
                     {
                         e.Row.Cells[7].Text = "绝密";
                     }
                 }
                 else
                 {
                     e.Row.Cells[7].Text = "机密";
                 }
             }
             else
             {
                 e.Row.Cells[7].Text = "秘密";
             }
         }
         TextBox textBox = (TextBox)e.Row.Cells[8].Controls[1];
         textBox.Text = ((DataRowView)e.Row.DataItem)["PlanReturnDate"].ToString();
     }
 }
예제 #20
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('密码修改未成功,请重试!');";
    }
예제 #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this._iSysID        = int.Parse(this.Session["SysID"].ToString());
        this._strSenderCode = this.Session["yhdm"].ToString();
        userManageDb userManageDb = new userManageDb();

        this._strSenderName = userManageDb.GetUserName(this._strSenderCode);
        try
        {
            this._iMailID     = int.Parse(base.Request.QueryString["mailID"].ToString());
            this._strMailBox  = base.Request.QueryString["mailBox"].ToString();
            this._strOperType = base.Request.QueryString["oType"].ToString();
        }
        catch
        {
            base.Response.End();
        }
        if (!base.IsPostBack)
        {
            this.Session["System"]     = "";
            this.Session["HumanCode"]  = "";
            this.Session["HumanName"]  = "";
            this.Session["HumanCode2"] = "";
            this.Session["HumanName2"] = "";
            this.Session["HumanCode3"] = "";
            this.Session["HumanName3"] = "";
            if (this.DelTempAnnex(this._strSenderCode))
            {
                this.GetDraft(this._iMailID);
                return;
            }
            this.RegisterClientScriptBlock("warn", "<SCRIPT language=\"JavaScript\">alert('删除临时文件出错!');</SCRIPT>");
        }
    }
예제 #22
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('审核密码修改未成功,请重试!');";
    }
예제 #23
0
    protected void BtnAdd_Click(object sender, EventArgs e)
    {
        if (this.tbUserName.Text.Trim() == "")
        {
            this.js.Text = "alert('用户名称必填!');";
            return;
        }
        if (this.tbID.Text.Trim() == "")
        {
            this.js.Text = "alert('用户登录ID必填!');";
            return;
        }
        if (this.tbPwd.Text.Trim() == "")
        {
            this.js.Text = "alert('用户密码必填!');";
            return;
        }

        userManageDb userManageDb = new userManageDb();

        if (userManageDb.IsReturnLoginID(this.tbID.Text.Trim()))
        {
            this.js.Text = "alert('登录ID重复!');";
            return;
        }
        bool flag = userManageDb.userAdd(this.tbID.Text.Trim(), this.tbUserName.Text.Trim(), this.tbPwd.Text.Trim(), this.hdnTempDeptCode.Value, "-1", 2097152, 100, this.DDLyhjs.SelectedValue.ToString());

        if (flag)
        {
            this.js.Text = "alert('增加成功!');window.close();";
            return;
        }
        this.js.Text = "alert('" + userManageDb.MessageString + "');";
    }
예제 #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManageDb userManageDb = new userManageDb();

        if (this.Page.Request.Params["code"] == null)
        {
            this.lblCaption.Text = "<font color=red>请选择部门</font>";
            this._DeptCode       = "0";
            return;
        }
        if (this.Page.Request.Params["code"] != null)
        {
            if (base.UserCode != "00000000")
            {
                return;
            }
            this._DeptCode = this.Page.Request.Params["code"].ToString();
            if (!this.Page.IsPostBack)
            {
                string    text      = userManageDb.depName(this._DeptCode);
                DataTable dataTable = userManageDb.depUserList(this._DeptCode, "y");
                this.dgUserList.DataSource = dataTable;
                this.dgUserList.DataBind();
                this.lblCaption.Text = string.Concat(new object[]
                {
                    "<font color=red> ",
                    text,
                    " </font>共有<font color=red> ",
                    dataTable.Rows.Count,
                    " </font>个用户"
                });
            }
        }
    }
예제 #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Cache.SetNoStore();
        SysManageDb sysManageDb = new SysManageDb();

        if (base.Request.QueryString.Count > 0)
        {
            try
            {
                this._iSysID = int.Parse(base.Request.QueryString["sysid"].ToString());
                goto IL_5F;
            }
            catch
            {
                goto IL_5F;
            }
        }
        this._iSysID = sysManageDb.GetDefault();
IL_5F:
        this.HdnSysID.Value = this._iSysID.ToString();
        if (!base.IsPostBack)
        {
            int num = 0;
            try
            {
                num = int.Parse(base.Request.QueryString["deptid"].ToString());
            }
            catch
            {
            }
            if (num > 1)
            {
                userManageDb userManageDb = new userManageDb();
                DataSet      dataSet      = userManageDb.DepUserQuaryForMail(num.ToString());
                DataTable    dataTable    = dataSet.Tables[0];
                this.LBoxHuman.Items.Clear();
                for (int i = 0; i < dataTable.Rows.Count; i++)
                {
                    ListItem item = new ListItem(dataTable.Rows[i]["v_xm"].ToString(), dataTable.Rows[i]["v_yhdm"].ToString());
                    this.LBoxHuman.Items.Add(item);
                }
            }
            else
            {
                if (num == -1)
                {
                    MailManage mailManage = new MailManage();
                    DataTable  dataTable2 = mailManage.SelLinkman(this.Session["yhdm"].ToString());
                    this.LBoxHuman.Items.Clear();
                    for (int j = 0; j < dataTable2.Rows.Count; j++)
                    {
                        ListItem item2 = new ListItem(dataTable2.Rows[j]["v_xm"].ToString(), dataTable2.Rows[j]["v_yhdm"].ToString());
                        this.LBoxHuman.Items.Add(item2);
                    }
                }
            }
            this.SelectedList_Restore();
        }
    }
예제 #26
0
    private void DGrdMember_DataBind(string strDeptCode, string strIsValid)
    {
        userManageDb userManageDb = new userManageDb();
        DataTable    dataTable    = userManageDb.DepUserQuaryDt(strDeptCode, strIsValid);

        this.DGrdMember.DataSource = dataTable.DefaultView;
        this.DGrdMember.DataBind();
    }
예제 #27
0
    protected void GetPageData()
    {
        SalaryGAModel model        = this.sga.GetModel(this.rid);
        userManageDb  userManageDb = new userManageDb();

        this.txtUserCode.Text = userManageDb.GetUserName(model.UserCode);
        this.txtRemark.Text   = model.Remark;
        this.DBApplyDate.Text = model.ApplyDate.ToString();
    }
예제 #28
0
 protected void GVGroupAdjustDetail_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         DataRowView  dataRowView  = (DataRowView)e.Row.DataItem;
         userManageDb userManageDb = new userManageDb();
         e.Row.Cells[0].Text = userManageDb.GetUserName(dataRowView["EmployeeCode"].ToString());
     }
 }
예제 #29
0
    protected void GVApplication_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowIndex > -1)
        {
            DataRowView dataRowView = (DataRowView)e.Row.DataItem;
            e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
            e.Row.Attributes["onclick"]     = string.Concat(new string[]
            {
                "OnRecord(this);ClickRow('",
                dataRowView["RecordID"].ToString(),
                "','",
                dataRowView["AuditState"].ToString(),
                "');"
            });
            e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
            userManageDb userManageDb = new userManageDb();
            e.Row.Cells[1].Text            = userManageDb.GetUserName(e.Row.Cells[1].Text);
            e.Row.Attributes["ondblclick"] = "OpenLock();";
            e.Row.ToolTip = "双击查看详细信息";
            string text;
            switch (text = e.Row.Cells[2].Text)
            {
            case "1":
                e.Row.Cells[2].Text = "事假";
                break;

            case "2":
                e.Row.Cells[2].Text = "婚假";
                break;

            case "3":
                e.Row.Cells[2].Text = "年休假";
                break;

            case "4":
                e.Row.Cells[2].Text = "工伤";
                break;

            case "5":
                e.Row.Cells[2].Text = "病假";
                break;

            case "6":
                e.Row.Cells[2].Text = "产假";
                break;

            case "7":
                e.Row.Cells[2].Text = "丧假";
                break;
            }
            int num2 = AduitAction.SetOkState(dataRowView["AuditState"].ToString()).LastIndexOf('#');
            e.Row.Cells[8].Text = AduitAction.SetOkState(dataRowView["AuditState"].ToString()).Substring(0, num2);
            string value = AduitAction.SetOkState(dataRowView["AuditState"].ToString()).Substring(num2);
            e.Row.Cells[8].Style.Add("color", value);
        }
    }
예제 #30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.UserCode = base.Request.QueryString["yhdm"].ToString();
     if (!this.Page.IsPostBack)
     {
         userManageDb userManageDb = new userManageDb();
         this.ControlDept = "," + userManageDb.manageDept(this.UserCode) + ",";
         this.tvDepartment.Attributes["onclick"] = "javascript:postBackObject();";
         this.tvDepartment_AppendNode(this.tvDepartment.Nodes, 0, this.UserCode, true);
     }
 }