internal static SqlCommand Insert_Update_PO_Items(PO_Items objEntity) { string ip = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (string.IsNullOrEmpty(ip)) { ip = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; } var parameters = new[] { CreateParameter("@action", SqlDbType.VarChar, objEntity.action), CreateParameter("@POID", SqlDbType.Int, Convert.ToInt32(objEntity.POID)), CreateParameter("@Description", SqlDbType.VarChar, objEntity.Description), CreateParameter("@Unit", SqlDbType.VarChar, objEntity.Unit), CreateParameter("@Qty", SqlDbType.Int, Convert.ToInt32(objEntity.Qty)), CreateParameter("@Rate", SqlDbType.Decimal, objEntity.Rate), CreateParameter("@Comments", SqlDbType.VarChar, objEntity.Comments), CreateParameter("@ID", SqlDbType.Int, Convert.ToInt32(objEntity.ID)), }; return(CreateCommand("ins_PO_Items", parameters)); }
public List <PO_Items> Insert_Update_PO_Items(PO_Items objEntity) { return(SqlHelpers.GetObjects <PO_Items>(Util.Env, CommandFactory.Insert_Update_PO_Items(objEntity), AdminObjectFactory.Insert_Update_PO_Items_Factory)); }