public static List <clsOrigin> EditData(clsOrigin Obj) { List <clsOrigin> details = new List <clsOrigin>(); DataTable dt = new DataTable(); SqlParameter[] p = new SqlParameter[1]; p[0] = new SqlParameter("@ProductOriginID", Obj.ProductOriginID); dt = clsCURD.GetData("[IMIS_ProProductOriginSelectByID]", p); foreach (DataRow dtrow in dt.Rows) { clsOrigin obj = new clsOrigin(); obj.ProductOriginID = int.Parse(dtrow["ProductOriginID"].ToString()); obj.ProductOriginName = dtrow["ProductOriginName"].ToString(); details.Add(obj); } return(details); }
public static void Insert(clsOrigin Obj) { try { SqlParameter[] p = new SqlParameter[2]; p[0] = new SqlParameter("@ProductOriginName", Obj.ProductOriginName); p[1] = new SqlParameter("@UserID", Obj.UserID); clsCURD.ExecuteStoreProcedure("IMIS_ProProductOriginInsert", p); } catch (SqlException Sexp) { } catch (Exception ex) { } finally { } }
public static void Update(clsOrigin Obj) { try { SqlParameter[] p = new SqlParameter[3]; p[0] = new SqlParameter("@ProductOriginName", Obj.ProductOriginName); p[1] = new SqlParameter("@ProductOriginID", Obj.ProductOriginID); p[2] = new SqlParameter("@LastUpdatedBy", Obj.LastUpdatedBy); clsCURD.ExecuteStoreProcedure("IMIS_ProProductOriginUpdate", p); } catch (SqlException Sexp) { } catch (Exception ex) { } finally { } }