示例#1
0
        /// <summary>
        /// 更改员工额外奖惩情况信息
        /// </summary>
        /// <param name="New_SalaryAppend">新的员工额外奖惩情况实体</param>
        /// <returns></returns>
        public bool UpdateSalaryAppend(User_SalaryAppend TempSalaryAppend)
        {
            User_SalaryAppend OldSalaryAppend = DB_SalaryAppend.Select(P => P.SalaryAppend_ID == TempSalaryAppend.SalaryAppend_ID).SingleOrDefault();
            User_SalaryAppend NewSalaryAppend = OldSalaryAppend;

            NewSalaryAppend.SalaryAppend_Info  = TempSalaryAppend.SalaryAppend_Info;
            NewSalaryAppend.SalaryAppend_Price = TempSalaryAppend.SalaryAppend_Price;
            NewSalaryAppend.SalaryAppend_Time  = TempSalaryAppend.SalaryAppend_Time;
            NewSalaryAppend.SalaryAppend_User  = TempSalaryAppend.SalaryAppend_User;
            return(DB_SalaryAppend.Update(OldSalaryAppend, NewSalaryAppend));
        }
示例#2
0
        private void BT_Update_Click(object sender, EventArgs e)
        {
            User_SalaryAppend model = SalaryAppend_Client.SelectSalaryAppend_ID((int)LB_SalaryAppend.SelectedValue);

            model.SalaryAppend_Time  = DTP_Date.Value;
            model.SalaryAppend_Info  = TB_Action.Text;
            model.SalaryAppend_Price = Convert.ToDecimal(TB_Price.Text);
            if (SalaryAppend_Client.UpdateSalaryAppend(model))
            {
                MessageBox.Show("修改成功!", "提示!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                List_SalaryAppend  = SalaryInfoSummery_Client.SelectSalaryAppend().Where(P => P.SalaryAppend_Time.Year == DateTime.Now.Year && P.SalaryAppend_Time.Month == DateTime.Now.Month).ToList();
                LB_User.DataSource = UserManager_Client.GetAllShops(null, null, ShopID).ToList();
            }
            else
            {
                MessageBox.Show("修改失败!请联系管理员!", "错误!", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
示例#3
0
        /// <summary>
        /// 删除员工额外奖惩情况信息
        /// </summary>
        /// <param name="SalaryAppend">要删除的员工额外奖惩情况实体</param>
        /// <returns></returns>
        public bool DeleteSalaryAppend(int SalaryAppendID)
        {
            User_SalaryAppend SA = DB_SalaryAppend.Select(P => P.SalaryAppend_ID == SalaryAppendID).Single();

            return(DB_SalaryAppend.Delete(SA));
        }
示例#4
0
 /// <summary>
 /// 新增员工额外奖惩情况信息
 /// </summary>
 /// <param name="SalaryAppend">要增加的员工额外奖惩情况实体</param>
 /// <returns></returns>
 public bool AddSalaryAppend(User_SalaryAppend SalaryAppend)
 {
     return(DB_SalaryAppend.Insert(SalaryAppend));
 }