Esempio n. 1
0
        public IActionResult Edit(OpticalDiscEditViewModel opticalDisc)
        {
            OpticalDiscBusiness opticalDiscBusiness = new OpticalDiscBusiness();
            var result = opticalDiscBusiness.Edit(opticalDisc);

            return(Ok(result));
        }
Esempio n. 2
0
        public async Task <ActionResult> Edit(OpticalDiscEditViewModel opticalDisc)
        {
            opticalDisc.EditBy = _userSessionHelper.GetUserSession().UserName;
            string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.OPTICAL_DISC_EDIT);
            var    result = await HttpUtilities.PostAsyncApi <ReturnResult <OpticalDiscEditViewModel> >(apiUrl, JsonConvert.SerializeObject(opticalDisc));

            return(Json(result));
        }
Esempio n. 3
0
        public ReturnResult <OpticalDisc> Edit(OpticalDiscEditViewModel opticalDisc)
        {
            DbProvider dbProvider = new DbProvider();
            string     outCode    = String.Empty;
            string     outMessage = String.Empty;
            StoredProcedureConfigs <OpticalDisc> storedProcedureConfigs = new StoredProcedureConfigs <OpticalDisc>();

            dbProvider.SetQuery(storedProcedureConfigs._UPDATE_SINGLE_STORED_PROCEDURE, CommandType.StoredProcedure)
            .SetParameter("Id", SqlDbType.NVarChar, opticalDisc.Pk_id, 100, ParameterDirection.Input)
            .SetParameter("Name", SqlDbType.NVarChar, opticalDisc.Name, 100, ParameterDirection.Input)
            .SetParameter("Status", SqlDbType.Int, opticalDisc.Status, ParameterDirection.Input)
            .SetParameter("EditBy", SqlDbType.NVarChar, opticalDisc.EditBy, ParameterDirection.Input)
            .SetParameter("ERROR_CODE", SqlDbType.NVarChar, DBNull.Value, 100, ParameterDirection.Output)
            .SetParameter("ERROR_MESSAGE", SqlDbType.NVarChar, DBNull.Value, 400, ParameterDirection.Output)
            .ExcuteNonQuery()
            .Complete();
            dbProvider.GetOutValue("ERROR_CODE", out outCode)
            .GetOutValue("ERROR_MESSAGE", out outMessage);
            return(new ReturnResult <OpticalDisc>()
            {
                ErrorCode = outCode,
                ErrorMessage = outMessage,
            });
        }
 public ReturnResult <OpticalDisc> Edit(OpticalDiscEditViewModel opticalDisc)
 {
     return(OpticalDiscDAL.Edit(opticalDisc));
 }