public DataSet GetRFPHeaderByCustomerID(BLRFPHeader obj) { string queryString = "CALL SP_MANAGERFPHEADER(?_RFPID, ?_RFPCODE, ?_RFPDATE, ?_CUSTOMERID, ?_INDUSTRYTYPEID, ?_RFPAMOUNT, ?_STARTDATE, ?_RFPOWNER, ?_CURRENTSTAGINGOWNER, ?_DIESELRATE, ?_AGEOFTRUCK, ?_ACTIVE, ?_CREATEDBY, ?_CREATEDON, ?_SEARCH1, ?_SEARCH2, ?_SEARCH3, ?_MODE)"; MySqlParameter[] mySqlParam = new MySqlParameter[18]; mySqlParam[0] = CreateParameters(DbType.Int32, obj._RFPID, "?_RFPID", ParameterDirection.Input); mySqlParam[1] = CreateParameters(DbType.String, obj._RFPCODE, "?_RFPCODE", ParameterDirection.Input); mySqlParam[2] = CreateParameters(DbType.DateTime, obj._RFPDATE, "?_RFPDATE", ParameterDirection.Input); mySqlParam[3] = CreateParameters(DbType.Int32, obj._CUSTOMERID, "?_CUSTOMERID", ParameterDirection.Input); mySqlParam[4] = CreateParameters(DbType.Int32, obj._INDUSTRYTYPEID, "?_INDUSTRYTYPEID", ParameterDirection.Input); mySqlParam[5] = CreateParameters(DbType.Decimal, obj._RFPAMOUNT, "?_RFPAMOUNT", ParameterDirection.Input); mySqlParam[6] = CreateParameters(DbType.DateTime, "2016-01-17 14:18:21", "?_STARTDATE", ParameterDirection.Input); mySqlParam[7] = CreateParameters(DbType.String, obj._RFPOWNER, "?_RFPOWNER", ParameterDirection.Input); mySqlParam[8] = CreateParameters(DbType.String, obj._CURRENTSTAGINGOWNER, "?_CURRENTSTAGINGOWNER", ParameterDirection.Input); mySqlParam[9] = CreateParameters(DbType.Decimal, "10.00", "?_DIESELRATE", ParameterDirection.Input); mySqlParam[10] = CreateParameters(DbType.Int32, obj._AGEOFTRUCK, "?_AGEOFTRUCK", ParameterDirection.Input); mySqlParam[11] = CreateParameters(DbType.String, obj._ACTIVE, "?_ACTIVE", ParameterDirection.Input); mySqlParam[12] = CreateParameters(DbType.Int32, obj._CREATEDBY, "?_CREATEDBY", ParameterDirection.Input); mySqlParam[13] = CreateParameters(DbType.Date, "2016-01-17 14:18:21", "?_CREATEDON", ParameterDirection.Input); mySqlParam[14] = CreateParameters(DbType.String, "", "?_SEARCH1", ParameterDirection.Input); mySqlParam[15] = CreateParameters(DbType.String, "", "?_SEARCH2", ParameterDirection.Input); mySqlParam[16] = CreateParameters(DbType.String, "", "?_SEARCH3", ParameterDirection.Input); mySqlParam[17] = CreateParameters(DbType.String, obj._MODE, "?_MODE", ParameterDirection.Input); DataSet _ds = (DataSet)MySqlHelper.ExecuteDataset(connectionString, queryString, mySqlParam); return(_ds); }
public string ManageRFPHeaders(BLRFPHeader obj) { string result = string.Empty; if (obj._RFPID == null) { obj._RFPID = 0; } string queryString = "CALL SP_MANAGERFPHEADER(?_RFPID, ?_RFPCODE, ?_RFPDATE, ?_CUSTOMERID, ?_INDUSTRYTYPEID, ?_RFPAMOUNT, ?_STARTDATE, ?_RFPOWNER, ?_CURRENTSTAGINGOWNER, ?_DIESELRATE, ?_AGEOFTRUCK, ?_ACTIVE, ?_CREATEDBY, ?_CREATEDON, ?_SEARCH1, ?_SEARCH2, ?_SEARCH3, ?_MODE)"; MySqlParameter[] mySqlParam = new MySqlParameter[18]; mySqlParam[0] = CreateParameters(DbType.Int32, obj._RFPID, "?_RFPID", ParameterDirection.Input); mySqlParam[1] = CreateParameters(DbType.String, obj._RFPCODE, "?_RFPCODE", ParameterDirection.Input); mySqlParam[2] = CreateParameters(DbType.DateTime, obj._RFPDATE, "?_RFPDATE", ParameterDirection.Input); mySqlParam[3] = CreateParameters(DbType.Int32, obj._CUSTOMERID, "?_CUSTOMERID", ParameterDirection.Input); mySqlParam[4] = CreateParameters(DbType.Int32, obj._INDUSTRYTYPEID, "?_INDUSTRYTYPEID", ParameterDirection.Input); mySqlParam[5] = CreateParameters(DbType.Decimal, obj._RFPAMOUNT, "?_RFPAMOUNT", ParameterDirection.Input); mySqlParam[6] = CreateParameters(DbType.DateTime, "2016-01-17 14:18:21", "?_STARTDATE", ParameterDirection.Input); mySqlParam[7] = CreateParameters(DbType.String, obj._RFPOWNER, "?_RFPOWNER", ParameterDirection.Input); mySqlParam[8] = CreateParameters(DbType.String, obj._CURRENTSTAGINGOWNER, "?_CURRENTSTAGINGOWNER", ParameterDirection.Input); mySqlParam[9] = CreateParameters(DbType.Decimal, obj._DIESELRATE, "?_DIESELRATE", ParameterDirection.Input); mySqlParam[10] = CreateParameters(DbType.Int32, obj._AGEOFTRUCK, "?_AGEOFTRUCK", ParameterDirection.Input); mySqlParam[11] = CreateParameters(DbType.String, obj._ACTIVE, "?_ACTIVE", ParameterDirection.Input); mySqlParam[12] = CreateParameters(DbType.Int32, obj._CREATEDBY, "?_CREATEDBY", ParameterDirection.Input); mySqlParam[13] = CreateParameters(DbType.Date, "2016-01-17 14:18:21", "?_CREATEDON", ParameterDirection.Input); mySqlParam[14] = CreateParameters(DbType.String, obj._SEARCH1, "?_SEARCH1", ParameterDirection.Input); mySqlParam[15] = CreateParameters(DbType.String, obj._SEARCH2, "?_SEARCH2", ParameterDirection.Input); mySqlParam[16] = CreateParameters(DbType.String, obj._SEARCH3, "?_SEARCH3", ParameterDirection.Input); mySqlParam[17] = CreateParameters(DbType.String, obj._MODE, "?_MODE", ParameterDirection.Input); return((string)MySqlHelper.ExecuteScalar(connectionString, queryString, mySqlParam)); }
public string ManageRFPHeaders(int _RFPID, string _RFPCODE, DateTime _RFPDATE, int _CUSTOMERID, int _INDUSTRYTYPEID, decimal _RFPAMOUNT, DateTime _STARTDATE, int _RFPOWNER, int _CURRENTSTAGINGOWNER, decimal _DIESELRATE, int _AGEOFTRUCK, string _ACTIVE, int _CREATEDBY, DateTime _CREATEDON, string _SEARCH1, string _SEARCH2, string _SEARCH3, string _MODE) { using (BLRFPHeader objbl = new BLRFPHeader()) { objbl._RFPID = Convert.ToInt32(_RFPID); objbl._RFPCODE = _RFPCODE; objbl._RFPDATE = Convert.ToDateTime(_RFPDATE); objbl._CUSTOMERID = Convert.ToInt32(_CUSTOMERID); objbl._INDUSTRYTYPEID = Convert.ToInt32(_INDUSTRYTYPEID); objbl._RFPAMOUNT = Convert.ToDecimal(_RFPAMOUNT); objbl._STARTDATE = Convert.ToDateTime(_STARTDATE); objbl._RFPOWNER = Convert.ToInt32(_RFPOWNER); objbl._CURRENTSTAGINGOWNER = Convert.ToInt32(_CURRENTSTAGINGOWNER); objbl._DIESELRATE = Convert.ToDecimal(_DIESELRATE); objbl._AGEOFTRUCK = Convert.ToInt32(_AGEOFTRUCK); objbl._ACTIVE = _ACTIVE; objbl._CREATEDBY = Convert.ToInt32(_CREATEDBY); objbl._CREATEDONDATE = Convert.ToDateTime(_CREATEDON); objbl._SEARCH1 = _SEARCH1; objbl._SEARCH2 = _SEARCH2; objbl._SEARCH3 = _SEARCH3; objbl._MODE = _MODE; //================== return(objbl.ManageRFPHeaders()); //================== } }
public GetRFPHeader[] GetRFPHeaders(int _RFPID, string _RFPCODE, DateTime _RFPDATE, int _CUSTOMERID, int _INDUSTRYTYPEID, decimal _RFPAMOUNT, DateTime _STARTDATE, int _RFPOWNER, int _CURRENTSTAGINGOWNER, decimal _DIESELRATE, int _AGEOFTRUCK, string _ACTIVE, int _CREATEDBY, DateTime _CREATEDON, string _SEARCH1, string _SEARCH2, string _SEARCH3, string _MODE) { List <GetRFPHeader> returnObj = new List <GetRFPHeader>(); using (BLRFPHeader obj = new BLRFPHeader()) { //============ obj._RFPID = _RFPID; obj._RFPCODE = _RFPCODE; obj._RFPDATE = _RFPDATE; obj._CUSTOMERID = _CUSTOMERID; obj._INDUSTRYTYPEID = _INDUSTRYTYPEID; obj._RFPAMOUNT = _RFPAMOUNT; obj._STARTDATE = _STARTDATE; obj._RFPOWNER = _RFPOWNER; obj._CURRENTSTAGINGOWNER = _CURRENTSTAGINGOWNER; obj._DIESELRATE = _DIESELRATE; obj._AGEOFTRUCK = _AGEOFTRUCK; obj._ACTIVE = _ACTIVE; obj._CREATEDBY = _CREATEDBY; obj._CREATEDONDATE = _CREATEDON; obj._SEARCH1 = _SEARCH1; obj._SEARCH2 = _SEARCH2; obj._SEARCH3 = _SEARCH3; obj._MODE = _MODE; //============ DataSet ds = obj.GetRFPHeaders(); //============ foreach (DataRow item in ds.Tables[0].Rows) { returnObj.Add(new GetRFPHeader() { RFPID = Convert.ToInt32(item["RFPID"]), RFPCODE = Convert.ToString(item["RFPCODE"]), RFPDATE = Convert.ToDateTime(item["RFPDATE"]), CUSTOMERID = Convert.ToInt32(item["CUSTOMERID"]), INDUSTRYTYPEID = Convert.ToInt32(item["INDUSTRYTYPEID"]), RFPAMOUNT = Convert.ToDecimal(item["RFPAMOUNT"]), STARTDATE = Convert.ToDateTime(item["STARTDATE"]), RFPOWNER = Convert.ToInt32(item["RFPOWNER"]), CURRENTSTAGINGOWNER = Convert.ToInt32(item["CURRENTSTAGINGOWNER"]), ACTIVE = Convert.ToString(item["ACTIVE"]), CUSTOMERNAME = Convert.ToString(item["CUSTOMERNAME"]), INDUSTRYTYPENAME = Convert.ToString(item["INDUSTRYTYPENAME"]), OWNERNAME = Convert.ToString(item["OWNERNAME"]), CURRENTOWNERNAME = Convert.ToString(item["CURRENTOWNERNAME"]), }); } } return(returnObj.ToArray()); }
public DataSet GetRFPHeaders(BLRFPHeader obj) { if (obj._MODE == "BYRFPID") { return(GetRFPHeaderByRFPID(obj)); } if (obj._MODE == "BYCUSTOMERID") { return(GetRFPHeaderByCustomerID(obj)); } else if (obj._MODE == "GETALL") { return(GetAllActiveRFPHeaders(obj)); } else { return(SearchRFPHeader(obj)); } }