public static ClsReturnValues setCargoType(ClsCargoType obj, Guid SessionID) { ClsReturnValues lst = new ClsReturnValues(); using (var db = new tdoEntities()) { lst = db.uspAddEditCargoType(obj.cargoTypeID, obj.cargoTypeName, obj.createdByID, SessionID).FirstOrDefault(); } return(lst); }
public static ClsReturnValues setCargoType(ClsCargoType item) { ClsReturnValues obj = new ClsReturnValues(); try { using (var db = new tdoEntities()) { obj = db.uspAddEditCargoType(item.cargoTypeID, item.cargoTypeName,item.createdByID,item.sessionID).FirstOrDefault(); } } catch (Exception ex) { obj.Response = ex.Message; obj.IsSuccess = false; obj.ID = 0; } return obj; }
public static ClsReturnValues setCargoType(ClsCargoType item) { ClsReturnValues obj = new ClsReturnValues(); try { using (var db = new tdoEntities()) { obj = db.uspAddEditCargoType(item.cargoTypeID, item.cargoTypeName, item.createdByID, item.sessionID).FirstOrDefault(); } } catch (Exception ex) { obj.Response = ex.Message; obj.IsSuccess = false; obj.ID = 0; } return(obj); }
public static ClsReturnValues setCargoType(ClsCargoType obj, Guid SessionID) { ClsReturnValues lst = new ClsReturnValues(); using (var db = new tdoEntities()) { lst = db.uspAddEditCargoType(obj.cargoTypeID, obj.cargoTypeName, obj.createdByID, SessionID).FirstOrDefault(); } return lst; }