コード例 #1
0
        /// <summary>
        /// 添加辞职信息
        /// </summary>
        /// <param name="MY"></param>
        /// <returns></returns>
        public static bool TR(Entity.Resignation MY)
        {
            string sql = string.Format("INSERT INTO Resignation  VALUES('{0}','{1}','{2}','申请中')", MY.pID, MY.rText, System.DateTime.Now);
            int    i   = (int)DBHelper.GetLine(sql);

            if (i > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        /// <summary>
        /// 删除辞职表
        /// </summary>
        /// <param name="pr"></param>
        /// <returns></returns>
        public static bool SR(Entity.Resignation dd)
        {
            string sqlstr = "delete from Resignation where RID='" + dd.rID + "'";
            int    i      = DBHelper.GetLine(sqlstr);

            if (i > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
        /// <summary>
        /// 修改状态的方法
        /// </summary>
        /// <param name="pr"></param>
        /// <returns></returns>
        public static bool xR(Entity.Resignation pr)
        {
            string sqlstr = "update Resignation set Rstate='" + pr.rState + "' where RID='" + pr.rID + "'";
            int    i      = DBHelper.GetLine(sqlstr);

            if (i > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #4
0
        private void btn_no_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.Rows.Count == 0)
            {
                return;
            }
            if (this.textBox1.Text == "")
            {
                Msg.Box.Show("请选择信息");
                return;
            }


            bool isGo = Msg.Box.RShow("是否同意该员工的辞职申请?", Msg.Box.Ico.Question);

            if (isGo == true)
            {
                Entity.Person per = new Entity.Person();
                per.pID = int.Parse(this.dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[1].Value.ToString());

                Entity.Resignation RE = new Entity.Resignation();
                RE.rID = int.Parse(this.textBox1.Text);
                bool XG = BLL.ResignationBLL.SR(RE);
                if (XG == true)
                {
                    Msg.Box.Show("辞退成功!", "成功提示", Msg.Box.Ico.Info);
                    BLL.PersonBLL.Person1(per);
                    this.dataGridView1.DataSource = BLL.ResignationBLL.cr();
                }
                else
                {
                    Msg.Box.Show("辞退失败!", "失败示", Msg.Box.Ico.Info);
                    return;
                }
            }
            else
            {
                Msg.Box.Show("辞退失败!", "失败示", Msg.Box.Ico.Info);
                return;
            }
        }
コード例 #5
0
        private void btn_use_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.Rows.Count == 0)
            {
                return;
            }
            if (this.textBox1.Text == "")
            {
                Msg.Box.Show("请选择信息");
                return;
            }
            Entity.Resignation RE = new Entity.Resignation();
            RE.rID    = int.Parse(this.textBox1.Text);
            RE.rState = "驳回";
            bool XG = BLL.ResignationBLL.XG(RE);

            if (XG == true)
            {
                Msg.Box.Show("驳回成功!", "成功提示", Msg.Box.Ico.Info);
                this.dataGridView1.DataSource = BLL.ResignationBLL.cr();
            }
        }
コード例 #6
0
 /// <summary>
 /// 传递添加个人辞职申请的方法
 /// </summary>
 /// <param name="Tr"></param>
 /// <returns></returns>
 public static bool TR(Entity.Resignation Tr)
 {
     return(EDAL.MyInfoDAL.TR(Tr));
 }
コード例 #7
0
 /// <summary>
 /// 传递查询个人申请的方法
 /// </summary>
 /// <param name="Cr"></param>
 /// <returns></returns>
 public static System.Data.DataTable CR(Entity.Resignation Cr)
 {
     return(EDAL.MyInfoDAL.CR(Cr));
 }
コード例 #8
0
        /// <summary>
        /// 查询个人辞职申请
        /// </summary>
        /// <returns></returns>
        public static System.Data.DataTable CR(Entity.Resignation CR)
        {
            string sql = "select  RID 编号,Person.PID 工号,PName 姓名,JName 所在岗位,Rtext 辞职理由,RTime 申请时间,Rstate 状态 from Resignation,Person,Job where Resignation.PID=Person.PID and Job.JID =Person.JID and Person.PID='" + CR.pID + "'";

            return(DBHelper.GetDT(sql));
        }
コード例 #9
0
 /// <summary>
 /// 传递删除信息的方法
 /// </summary>
 /// <param name="Re"></param>
 /// <returns></returns>
 public static bool SR(Entity.Resignation dd)
 {
     return(DAL.ResignationDAL.SR(dd));
 }
コード例 #10
0
 /// <summary>
 /// 传递修改状态的方法
 /// </summary>
 /// <param name="Re"></param>
 /// <returns></returns>
 public static bool XG(Entity.Resignation Re)
 {
     return(DAL.ResignationDAL.xR(Re));
 }