コード例 #1
0
 public virtual void Save()
 {
     ChitSubscribe.CustomerName = CustomerName;
     ChitSubscribe.MobileNumber = MobileNumber;
     ChitSubscribe.Address      = Address;
     if (SelectedCustomer != null)
     {
         ChitSubscribe.CustomerId = SelectedCustomer.Id;
     }
     if (!Validate())
     {
         return;
     }
     IsProgressBarVisible = true;
     try
     {
         var result = _dueService.Save(ChitSubscribe);
         Message               = "Saved Successfullly and id is " + result.ChitSubscriber.SubscribeId;
         ChitSubscribe         = new ChitSubscribeDomain();
         SaveCommand.IsEnabled = false;
     }
     catch (Exception exception)
     {
         SayMessage(false, exception.Message);
     }
     IsProgressBarVisible = false;
 }
コード例 #2
0
        public void Save()
        {
            if (!Validate())
            {
                return;
            }

            var result = chitDueService.Save(SubscribeDomain);

            if (result == null)
            {
                Message = "Something went wrong";
            }
            else
            {
                SayMessage(true, "Successfully saved");
            }
        }
コード例 #3
0
        public IActionResult Post([FromBody] ChitSubscribeDomain value)
        {
            var resultObj = _chitDueService.Save(value);

            return(Ok(resultObj));
        }