Example #1
0
 public void SaveMainRow()
 {
     foreach (var behalfFiltered in MainRowList.Where(x => x.Checked))
     {
         Client.TerminateEmpAsync(behalfFiltered.Emplid);
     }
 }
Example #2
0
        public void SaveMainRow()
        {
            Loading = true;
            var observableCollectionIserials = new ObservableCollection <int>();

            foreach (var item in MainRowList.Where(w => w.Saved == true).Select(w => w.Iserial).ToList())
            {
                observableCollectionIserials.Add(item);
            }
            Glclient.UpdateorInsertClosingAdvanceVendorPaymentsAsync(PostDate, observableCollectionIserials, LoggedUserInfo.Iserial, LoggedUserInfo.DatabasEname);
        }
Example #3
0
 private void item_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     RaisePropertyChanged(e.PropertyName);
     if (e.PropertyName == "DefaultImage")
     {
         foreach (var tblStyleImageViewModel in MainRowList.Where(x => x != SelectedMainRow && x.DefaultImage && x.TblColor == SelectedMainRow.TblColor))
         {
             tblStyleImageViewModel.DefaultImage = false;
         }
     }
 }
Example #4
0
        public void SaveMainRow()
        {
            foreach (var row in MainRowList.Where(x => x.Iserial == 0))
            {
                var isvalid = Validator.TryValidateObject(row,
                                                          new ValidationContext(row, null, null), null, true);

                if (isvalid)
                {
                    var saveRow = new ProductionService.TblStyleTNAStatusDetail();

                    saveRow.InjectFrom(row);
                    int x = MainRowList.IndexOf(row);
                    ProductionClient.UpdateOrInsertTblStyleTNAStatusDetailAsync(saveRow, MainRowList.IndexOf(row));
                    TempStyleViewModel.Loading = true;
                    Loading = true;
                }
            }
        }
Example #5
0
        public void SaveMainRow()
        {
            foreach (var row in MainRowList.Where(x => x.Iserial == 0))
            {
                var isvalid = Validator.TryValidateObject(row,
                                                          new ValidationContext(row, null, null), null, true);

                if (isvalid)
                {
                    var saveRow = new TblApproval();
                    saveRow.InjectFrom(row);

                    //CheckTNA
                    if (saveRow.ApprovalType == 1 && saveRow.ApprovedStatus == 1)
                    {
                        LkpData.LkpDataClient _client = new LkpData.LkpDataClient();
                        _client.CheckTNAAsync(SelectedMainRow.TblSalesOrder, LoggedUserInfo.WFM_UserJob.Value);
                        _client.CheckTNACompleted += (s, sv) =>
                        {
                            if (sv.Result == true)
                            {
                                Client.UpdateOrInsertTblApprovalAsync(saveRow, MainRowList.IndexOf(row), Perm);
                                TempStyleViewModel.Loading = true;
                                Loading = true;
                            }
                            else
                            {
                                MessageBox.Show("Kindly Check TNA");
                            }
                        };
                    }
                    else
                    {
                        Client.UpdateOrInsertTblApprovalAsync(saveRow, MainRowList.IndexOf(row), Perm);
                        TempStyleViewModel.Loading = true;
                        Loading = true;
                    }
                }
            }
        }