Exemplo n.º 1
0
        //职位表的查询(通过部门ID)
        public static DataSet selectallbyDID(departjob de)
        {
            sqltext = "select  jobid as 职务编号,jobname as 职务,dx as 底薪 from departjob where did ='" + de.Did + "'";
            DataSet jb = DAL.SQLHELPER.ExecuteDataSet(sqltext);

            return(jb);
        }
Exemplo n.º 2
0
        //职位表添加
        public static object jobadd(departjob de)
        {
            sqltext = "insert into departjob(did,jobname,dx)values ('" + de.Did + "','" + de.Jobname + "','" + de.Dx + "')";
            int i = (int)DAL.SQLHELPER.ExecuteNonQuery(sqltext);

            return(i);
        }
Exemplo n.º 3
0
        void bind()
        {
            /////
            departjob de = new departjob();

            de.Did = _listdid[this.skinComboBox1.SelectedIndex];
            this.skinDataGridView1.DataSource = BLL.JobBLL.selectallbyDID(de).Tables[0];
        }
Exemplo n.º 4
0
        private void btnsubmit_Click(object sender, EventArgs e)
        {
            string    name = this.txtJob.Text;
            int       did  = _listdid[this.skinComboBox1.SelectedIndex];
            departjob job  = new departjob();

            job.Jobname = name;
            job.Did     = did;
            job.Dx      = Convert.ToInt32(txtDx.Text);
            BLL.JobBLL.jobadd(job);
            bind();
        }
Exemplo n.º 5
0
        void binddata()
        {
            //绑定数据
            UserInfo uinfo = new UserInfo();

            uinfo.Uid = this._uid;
            DataTable dt = BLL.UserBLL.selectOneByUID(uinfo).Tables[0];

            this.labuid.Text  = _uid.ToString();
            this.labname.Text = dt.Rows[0][2].ToString();
            //  this.labsex.Text = dt.Rows[0][3].ToString();
            this.labbirth.Text = dt.Rows[0][4].ToString();
            this.labqq.Text    = dt.Rows[0][5].ToString();
            this.labphone.Text = dt.Rows[0][6].ToString();
            department de = new department();

            de.Did           = Convert.ToInt32(dt.Rows[0][7].ToString());
            this.labdid.Text = departmentBLL.selectByDID(de).Tables[0].Rows[0][1].ToString();
            //  this.labjob.Text = dt.Rows[0][8].ToString();
            this.labaddress.Text = dt.Rows[0][9].ToString();
            //  this.labEnable.Text = dt.Rows[0][10].ToString();

            ////初始化控件
            this.Text = "员工信息管理-" + this.labname.Text;
            this.comboxsex.SelectedIndex    = Convert.ToInt32(dt.Rows[0][3]);//男1 女0
            this.comboxEnable.SelectedIndex = Convert.ToInt32(dt.Rows[0][10]);
            ///部门下所有职位
            departjob depart = new departjob();

            depart.Did = Convert.ToInt32(dt.Rows[0][7]);
            DataTable dtAllJobs = JobBLL.selectall().Tables[0];//所有职位(修改职位 的方式可以直接修改所在部门)

            this.comboxjobs.Items.Clear();
            for (int i = 0; i < dtAllJobs.Rows.Count; i++)
            {
                this.comboxjobs.Items.Add(dtAllJobs.Rows[i][2]);
                //保存职位id
                _listjobid.Add(Convert.ToInt32(dtAllJobs.Rows[i][0]));
                if (Convert.ToInt32(dtAllJobs.Rows[i][0]) == Convert.ToInt32(dt.Rows[0][1]))
                {
                    this.comboxjobs.SelectedIndex = i;
                }
            }
        }
Exemplo n.º 6
0
 //职位表的查询(通过部门ID)
 public static DataSet selectallbyDID(departjob de)
 {
     return(DAL.JobServer.selectallbyDID(de));
 }
Exemplo n.º 7
0
 //职位表添加
 public static object jobadd(departjob de)
 {
     return(DAL.JobServer.jobadd(de));
 }