public int InsertConsultant(EntityConsultant entConsultant) { int cnt = 0; try { List <SqlParameter> lstParam = new List <SqlParameter>(); Commons.ADDParameter(ref lstParam, "@ConsCode", DbType.String, entConsultant.ConsultantCode); Commons.ADDParameter(ref lstParam, "@ConsFirstName", DbType.String, entConsultant.FirstName); Commons.ADDParameter(ref lstParam, "@ConsMiddleName", DbType.String, entConsultant.MiddleName); Commons.ADDParameter(ref lstParam, "@ConsLastName", DbType.String, entConsultant.LastName); Commons.ADDParameter(ref lstParam, "@ConsAddress", DbType.String, entConsultant.Address); Commons.ADDParameter(ref lstParam, "@ConsDOB", DbType.DateTime, entConsultant.DOB); Commons.ADDParameter(ref lstParam, "@ConsDOJ", DbType.DateTime, entConsultant.DOJ); Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entConsultant.EntryBy); Commons.ADDParameter(ref lstParam, "@WardNo", DbType.String, entConsultant.WardNo); Commons.ADDParameter(ref lstParam, "@Fees", DbType.String, entConsultant.Fees); cnt = mobjDataAcces.ExecuteQuery("sp_InsertConsultant", lstParam); } catch (Exception ex) { Commons.FileLog("ConsultantBLL - InsertConsultant(EntityConsultant entConsultant) ", ex); } return(cnt); }
private List <SqlParameter> CreateParameterDeleteCons(EntityConsultant entConsultant) { List <SqlParameter> lstParam = new List <SqlParameter>(); Commons.ADDParameter(ref lstParam, "@ConsCode", DbType.String, entConsultant.ConsultantCode); Commons.ADDParameter(ref lstParam, "@Discontinued", DbType.Boolean, entConsultant.DisContinued); Commons.ADDParameter(ref lstParam, "@DiscontRemark", DbType.String, entConsultant.DisContRemark); return(lstParam); }
//public DataTable GetConsultantName(string pstrConsCode) //{ // DataTable ldt = new DataTable(); // try // { // List<SqlParameter> lstParam = new List<SqlParameter>(); // Commons.ADDParameter(ref lstParam, "@ConsCode", DbType.String, pstrConsCode); // ldt = mobjDataAcces.GetDataTable("GetConsultantName", lstParam); // } // catch (Exception ex) // { // Commons.FileLog("ConsultantBLL - GetConsultantName(string pstrEmpCode)", ex); // } // return ldt; //} private List <SqlParameter> CreateParameterInsertConsultant(EntityConsultant entConsultant) { List <SqlParameter> lstParam = new List <SqlParameter>(); Commons.ADDParameter(ref lstParam, "@ConsCode", DbType.String, entConsultant.ConsultantCode); Commons.ADDParameter(ref lstParam, "@ConsFirstName", DbType.String, entConsultant.FirstName); Commons.ADDParameter(ref lstParam, "@ConsMiddleName", DbType.String, entConsultant.MiddleName); Commons.ADDParameter(ref lstParam, "@ConsLastName", DbType.String, entConsultant.LastName); Commons.ADDParameter(ref lstParam, "@ConsAddress", DbType.String, entConsultant.Address); Commons.ADDParameter(ref lstParam, "@ConsDOB", DbType.DateTime, entConsultant.DOB); Commons.ADDParameter(ref lstParam, "@ConsDOJ", DbType.DateTime, entConsultant.DOJ); return(lstParam); }