Example #1
0
        public ActionResult EditShengRiSave(Shengri model)
        {
            const string EditShengRiSaveSql = @"UPDATE dbo.TB_ShengRi
				                                   SET	BianHao=@BianHao,
					                                    XingMing=@XingMing,
					                                    ShengRi=@ShengRi
				                                   WHERE ID=@ID"                ;

            using (DbConnection conn = DbFactory.CreateConnection())
            {
                var result = conn.Execute(EditShengRiSaveSql, model) > 0;
            }
            return(RedirectToAction("ScanBirthdayIndex", "EmployeeBenefits"));
        }
Example #2
0
        public ActionResult AddBriDay(Shengri model)
        {
            SQLHelper    sqlh         = new SQLHelper();
            const string AddBriDaysql = @"INSERT INTO dbo.TB_ShengRi
                                       ( BianHao,XingMing,ShengRi)
                                        VALUES  ( @BianHao, 
                                                  @XingMing,
			                                      @ShengRi
            ) ";

            SqlParameter[] para = new SqlParameter[]
            {
                new SqlParameter("BianHao", model.BianHao),
                new SqlParameter("XingMing", model.XingMing),
                new SqlParameter("ShengRi", model.ShengRi)
            };
            sqlh.ExecData(AddBriDaysql, para);
            return(RedirectToAction("ScanBirthdayIndex", "EmployeeBenefits"));
        }