public BizResponseClass UpdateZipCode(AddZipCodeReq Request, long UserID)
 {
     try
     {
         BizResponseClass Resp = new BizResponseClass();
         var IsExist           = _commonRepoZipCode.GetSingle(item => item.Id == Request.ZipCodeID && item.Status == Convert.ToInt16(ServiceStatus.Active));
         if (IsExist != null)
         {
             IsExist.ZipCode     = Request.ZipCode;
             IsExist.ZipAreaName = Request.AreaName;
             IsExist.CityID      = Request.CityID;
             IsExist.Status      = Request.Status;
             IsExist.UpdatedBy   = UserID;
             IsExist.UpdatedDate = UTC_To_IST();
             _commonRepoZipCode.Update(IsExist);
             Resp.ErrorCode  = enErrorCode.Success;
             Resp.ReturnCode = enResponseCode.Success;
             Resp.ReturnMsg  = EnResponseMessage.RecordUpdated;
         }
         else
         {
             Resp.ErrorCode  = enErrorCode.NotFound;
             Resp.ReturnCode = enResponseCode.Fail;
             Resp.ReturnMsg  = EnResponseMessage.NotFound;
         }
         return(Resp);
     }
     catch (Exception ex)
     {
         HelperForLog.WriteErrorLog(System.Reflection.MethodBase.GetCurrentMethod().Name, this.GetType().Name, ex);
         throw;
     }
 }
        public async Task <IActionResult> AddZipCode(AddZipCodeReq Request)//long ZipCode, string AreaName, long CityID
        {
            BizResponseClass Response = new BizResponseClass();

            try
            {
                var user = await _userManager.GetUserAsync(HttpContext.User);

                if (user == null)
                {
                    Response.ReturnCode = enResponseCode.Fail;
                    Response.ReturnMsg  = EnResponseMessage.StandardLoginfailed;
                    Response.ErrorCode  = enErrorCode.StandardLoginfailed;
                }
                else
                {
                    var accessToken = await HttpContext.GetTokenAsync("access_token");

                    Response = _masterConfiguration.AddZipCode(Request, user.Id);//Request.ZipCode, Request.AreaName, Request.CityID
                }
                var     respObj     = JsonConvert.SerializeObject(Response);
                dynamic respObjJson = JObject.Parse(respObj);
                return(Ok(respObjJson));
            }
            catch (Exception ex)
            {
                return(BadRequest(new BizResponseClass {
                    ReturnCode = enResponseCode.InternalError, ReturnMsg = ex.ToString(), ErrorCode = enErrorCode.Status500InternalServerError
                }));
            }
        }
        public BizResponseClass AddZipCode(AddZipCodeReq Request, long UserID)//long ZipCode, string AreaName, long CityID, short Status
        {
            BizResponseClass Resp = new BizResponseClass();

            try
            {
                ZipCodeMaster obj = new ZipCodeMaster();
                obj.ZipCode     = Request.ZipCode;
                obj.ZipAreaName = Request.AreaName;
                obj.CityID      = Request.CityID;
                obj.Status      = Request.Status;
                obj.CreatedBy   = UserID;
                obj.CreatedDate = UTC_To_IST();
                _commonRepoZipCode.Add(obj);
                Resp.ErrorCode  = enErrorCode.Success;
                Resp.ReturnCode = enResponseCode.Success;
                Resp.ReturnMsg  = EnResponseMessage.RecordAdded;
                return(Resp);
            }
            catch (Exception ex)
            {
                HelperForLog.WriteErrorLog(System.Reflection.MethodBase.GetCurrentMethod().Name, this.GetType().Name, ex);
                throw ex;
            }
        }