コード例 #1
0
        /// <summary>
        /// 确认提交信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnSubmission_Click(object sender, EventArgs e)
        {
            U_Resignation re = new U_Resignation();

            if (string.IsNullOrEmpty(this.TbReason.Text) || string.IsNullOrEmpty(this.TbTime.Text))
            {
                JsMessage.jsAlert("辞职信息不能为空!");
                return;
            }
            use = (U_User)Session["U_USER"];
            int    i  = use.UID;
            int    dp = use.DID.DID;
            U_User u  = new U_User();

            u.UID  = i;
            re.UID = u;
            U_Department d = new U_Department();

            d.DID     = dp;
            re.DID    = d;
            re.Reason = this.TbReason.Text.ToString();
            re.Time   = Convert.ToDateTime(this.TbTime.Text.ToString());
            re.Remark = this.TbRemark.Text.Trim();
            re.State  = "null";
            if (string.IsNullOrEmpty(this.TbReason.Text) || string.IsNullOrEmpty(this.TbTime.Text))
            {
                JsMessage.jsAlert("辞职信息不能为空!");
                return;
            }
            DataTable r = new HrBll().H_SelResignations(i);

            //U_User us = new U_User();
            //us.UID=
            //int uid = r.UID.UID;
            if (r.Rows.Count == 1)
            {
                JsMessage.jsAlert("你已经发送过辞职信息了,不能反复发送!");
                return;
            }
            if (new UserBll().U_AddResigntion(re) > 0)
            {
                JsMessage.jsAlert("编辑成功!");
                use = (U_User)Session["U_USER"];
                M_JournalInfo ji = new Model.M_JournalInfo();
                ji.Content     = use.UserName + "编辑辞职信息!";
                ji.ReleaseTime = DateTime.Now.ToLocalTime();
                ji.LoginName   = use.LoginName;
                new UserBll().AddJournalInfo(ji);
                return;
            }

            //清空所有信息
            this.TbReason.Text = "";
            this.TbRemark.Text = "";
            this.TbTime.Text   = "";
        }
コード例 #2
0
        /// <summary>
        /// 根据部门进行查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnSelByDid_Click(object sender, EventArgs e)
        {
            int did = int.Parse(this.DdlDid.SelectedValue.ToString());
            List <U_Resignation> ti = new HrBll().H_SelReasontionByDID(did);

            CollectionPager1.DataSource    = ti;
            CollectionPager1.BindToControl = GvResignation;
            this.GvResignation.DataSource  = CollectionPager1.DataSourcePaged;
            this.GvResignation.DataBind();
        }
コード例 #3
0
        /// <summary>
        /// 根据员工名字进行模糊查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnSelByName_Click(object sender, EventArgs e)
        {
            string         name = this.TbName.Value.Trim();
            List <U_Leave> le   = new HrBll().H_selLeaveByName(name);

            CollectionPager1.DataSource    = le;
            CollectionPager1.BindToControl = RLeave;
            this.RLeave.DataSource         = CollectionPager1.DataSourcePaged;
            this.RLeave.DataBind();
        }
コード例 #4
0
        public void bind()
        {
            //查询辞职信息
            List <U_Resignation> ti = new HrBll().H_selResignation();

            CollectionPager1.DataSource    = ti;
            CollectionPager1.BindToControl = GvResignation;
            this.GvResignation.DataSource  = CollectionPager1.DataSourcePaged;
            this.GvResignation.DataBind();

            //查询部门信息
            this.DdlDid.DataSource     = new UserBll().U_SelDepartment();
            this.DdlDid.DataTextField  = "DName";
            this.DdlDid.DataValueField = "DID";
            this.DdlDid.DataBind();
        }
コード例 #5
0
        /// <summary>
        /// 通过部门进行查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnSelByD_Click(object sender, EventArgs e)
        {
            int did = int.Parse(this.DdlD.SelectedValue.ToString());

            if (string.IsNullOrEmpty(this.TbName.Value))
            {
                JsMessage.jsAlert("用户名字信息不能为空!");
                return;
            }
            List <U_Leave> le = new HrBll().H_selLeaveByDID(did);

            CollectionPager1.DataSource    = le;
            CollectionPager1.BindToControl = RLeave;
            this.RLeave.DataSource         = CollectionPager1.DataSourcePaged;
            this.RLeave.DataBind();
        }
コード例 #6
0
        /// <summary>
        /// 根据名字进行查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnSelByName_Click(object sender, EventArgs e)
        {
            string name = this.TbName.Value.Trim();

            if (string.IsNullOrEmpty(this.TbName.Value))
            {
                JsMessage.jsAlert("员工名字信息不能为空!");
                return;
            }
            List <U_Resignation> ti = new HrBll().H_SelReasontionByName(name);

            CollectionPager1.DataSource    = ti;
            CollectionPager1.BindToControl = GvResignation;
            this.GvResignation.DataSource  = CollectionPager1.DataSourcePaged;
            this.GvResignation.DataBind();
            this.TbName.Value = "";
        }
コード例 #7
0
        public void bind()
        {
            //为文本赋值
            List <U_Leave> ti = new HrBll().H_selLeave();

            CollectionPager1.DataSource    = ti;
            CollectionPager1.BindToControl = RLeave;
            this.RLeave.DataSource         = CollectionPager1.DataSourcePaged;
            this.RLeave.DataBind();


            //为部门赋值
            this.DdlD.DataSource     = new UserBll().U_SelDepartment();
            this.DdlD.DataTextField  = "DName";
            this.DdlD.DataValueField = "DID";
            this.DdlD.DataBind();
        }
コード例 #8
0
        /// <summary>
        /// 根据员工id进行模糊查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnSelByID_Click(object sender, EventArgs e)
        {
            int uid = int.Parse(this.TbNumber.Value.Trim());

            if (string.IsNullOrEmpty(this.TbNumber.Value))
            {
                JsMessage.jsAlert("员工编号不能为空!");
                return;
            }
            Regex idcard = new Regex("^[0-9]*$");

            if (!idcard.IsMatch(this.TbNumber.Value))
            {
                JsMessage.jsAlert("编号只能为数字!");
                return;
            }
            List <U_Leave> le = new HrBll().H_selLeaveByUid(uid);

            CollectionPager1.DataSource    = le;
            CollectionPager1.BindToControl = RLeave;
            this.RLeave.DataSource         = CollectionPager1.DataSourcePaged;
            this.RLeave.DataBind();
        }
コード例 #9
0
        /// <summary>
        /// 根据id进行模糊查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnSelByID_Click(object sender, EventArgs e)
        {
            int id = int.Parse(this.TbUid.Value.Trim());

            if (string.IsNullOrEmpty(this.TbUid.Value))
            {
                JsMessage.jsAlert("员工编号不能为空!");
                return;
            }
            Regex idcard = new Regex("^[0-9]*$");

            if (!idcard.IsMatch(this.TbUid.Value))
            {
                JsMessage.jsAlert("编号只能为数字!");
                return;
            }
            List <U_Resignation> ti = new HrBll().H_SelReasontionByUID(id);

            CollectionPager1.DataSource    = ti;
            CollectionPager1.BindToControl = GvResignation;
            this.GvResignation.DataSource  = CollectionPager1.DataSourcePaged;
            this.GvResignation.DataBind();
            this.TbUid.Value = "";
        }