public static int UpdateTbl_Limit(Tbl_Limit tbl_limit) { //WebBLL.Tbl_AdminManager.UpdateTbl_AdminLimitName(WebBLL.Tbl_LimitManager.GetTbl_LimitById(tbl_limit.ID).LimitName, tbl_limit.LimitName); //WebCommon.Public.WriteLog("Ð޸ĽÇÉ«£º" + tbl_limit.LimitName); tbl_limit.DealUser = WebCommon.Public.GetUserName(); tbl_limit.DealTime = DateTime.Now; return(new Tbl_LimitService().UpdateTbl_LimitById(tbl_limit)); }
public int AddTbl_Limit(Tbl_Limit tbl_limit) { string sql = "insert into [Tbl_Limit] ([LimitName],[LimitInfo],[Remark],[DealUser]) values (@LimitName,@LimitInfo,@Remark,@DealUser)"; SqlParameter[] sp = new SqlParameter[] { new SqlParameter("@LimitName", tbl_limit.LimitName), new SqlParameter("@LimitInfo", tbl_limit.LimitInfo), new SqlParameter("@Remark", tbl_limit.Remark), new SqlParameter("@DealUser", tbl_limit.DealUser) }; return(DBHelper.ExecuteNonQuery(this.connection, CommandType.Text, sql, sp)); }
public int UpdateTbl_LimitById(Tbl_Limit tbl_limit) { string sql = "update [Tbl_Limit] set [LimitName]=@LimitName,[LimitInfo]=@LimitInfo,[Remark]=@Remark,[DealFlag]=@DealFlag,[DealUser]=@DealUser,[DealTime]=@DealTime where DealFlag=0 and [ID]=@ID"; SqlParameter[] sp = new SqlParameter[] { new SqlParameter("@LimitName", tbl_limit.LimitName), new SqlParameter("@LimitInfo", tbl_limit.LimitInfo), new SqlParameter("@Remark", tbl_limit.Remark), new SqlParameter("@DealFlag", tbl_limit.DealFlag), new SqlParameter("@DealUser", tbl_limit.DealUser), new SqlParameter("@DealTime", tbl_limit.DealTime.ToString()), new SqlParameter("@ID", tbl_limit.ID) }; return(DBHelper.ExecuteNonQuery(this.connection, CommandType.Text, sql, sp)); }
/// <summary> ///根据SQL语句获取实体 /// </summary> private Tbl_Limit getTbl_LimitBySql(string sql) { Tbl_Limit tbl_limit = null; DataSet ds = DBHelper.ExecuteDataset(this.connection, CommandType.Text, sql); if (ds.Tables.Count > 0) { DataTable dt = ds.Tables[0]; tbl_limit = new Tbl_Limit(); foreach (DataRow dr in dt.Rows) { tbl_limit.ID = Convert.ToInt32(dr["ID"]); tbl_limit.LimitName = Convert.ToString(dr["LimitName"]); tbl_limit.LimitInfo = Convert.ToString(dr["LimitInfo"]); tbl_limit.Remark = Convert.ToString(dr["Remark"]); tbl_limit.DealFlag = Convert.ToInt32(dr["DealFlag"]); tbl_limit.DealUser = Convert.ToString(dr["DealUser"]); tbl_limit.DealTime = Convert.ToDateTime(dr["DealTime"]); tbl_limit.AddDate = Convert.ToDateTime(dr["AddDate"]); } } return(tbl_limit); }
public static int AddTbl_Limit(Tbl_Limit tbl_limit) { WebCommon.Public.WriteLog("Ìí¼Ó½ÇÉ«£º" + tbl_limit.LimitName); return(new Tbl_LimitService().AddTbl_Limit(tbl_limit)); }