Beispiel #1
0
        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 JsonResult setCargoType(int cargoTypeID, string cargoTypeName, int createdByID)
        {
            createdByID = 1;
            ClsCargoType obj = new ClsCargoType()
            {
                cargoTypeID   = cargoTypeID,
                cargoTypeName = cargoTypeName,
                createdByID   = createdByID
            };
            ClsReturnValues k = Setup.setCargoType(obj);

            return(Json(new { id = k.ID, isSuccess = k.IsSuccess ?? false ? 1 : 0, msg = k.Response }));
        }
Beispiel #3
0
        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);
        }