Пример #1
0
 private void ClearOperMaster()
 {
     LocCode    = string.Empty;
     LocName    = string.Empty;
     DtDataview = oLocMaster.GetLocationMaster();
     FocusCombo = true;
     FormLoadRights();
 }
Пример #2
0
        public LocationMasterViewModel()
        {
            UserInformation user = (UserInformation)App.Current.Properties["userinfo"];

            userinformation = user;
            oLocMaster      = new LocationMasterBll(userinformation);
            DtDataview      = oLocMaster.GetLocationMaster();
            this.selectChangeComboCommand = new DelegateCommand(this.SelectDataRow);
            this.addClickCommand          = new DelegateCommand(this.AddSubmitCommand);
            this.editClickCommand         = new DelegateCommand(this.EditSubmitCommand);
            this.updateLocCommand         = new DelegateCommand(this.CommonFormValUpdtae);
            this.deleteClickCommand       = new DelegateCommand(this.DeleteSubmitCommand);
        }
Пример #3
0
        public LocationMasterViewModel()
        {
            UserInformation user = (UserInformation)App.Current.Properties["userinfo"];

            userinformation = user;
            oLocMaster      = new LocationMasterBll(userinformation);
            DtDataview      = oLocMaster.GetLocationMaster();
            this.selectChangeComboCommand = new DelegateCommand(this.SelectDataRow);
            this.addClickCommand          = new DelegateCommand(this.AddSubmitCommand);
            this.editClickCommand         = new DelegateCommand(this.EditSubmitCommand);
            this.updateLocCommand         = new DelegateCommand(this.CommonFormValUpdtae);
            this.deleteClickCommand       = new DelegateCommand(this.DeleteSubmitCommand);
            UserRoleObjName   = "LOCATION MASTER";
            ComboBoxMaxLength = 2;
            ActionPermission  = oLocMaster.GetUserRights(UserRoleObjName);
            SetdropDownItems();
            FormLoadRights();
        }
Пример #4
0
        public void CommonFormValUpdtae()
        {
            try
            {
                if (String.IsNullOrEmpty(Convert.ToString(LocCode)))
                {
                    System.Windows.MessageBox.Show("Location Code should be Entered", "Process Designer");
                }
                else if (String.IsNullOrEmpty(LocName))
                {
                    System.Windows.MessageBox.Show("Location Name should be Entered", "Process Designer");
                }
                else
                {
                    bool val = oLocMaster.AddNewLocationMaster(LocCode, LocName, NextAction, ref _errMessage);
                    if (val)
                    {
                        System.Windows.MessageBox.Show(_errMessage, "Process Designer");
                        //MessageBox.Show(_errMessage);
                        ClearOperMaster();
                    }
                    if (val == false)
                    {
                        if ((string)_errMessage != "")
                        {
                            MessageBox.Show(_errMessage, "Process Designer");
                        }
                    }
                }

                DtDataview = oLocMaster.GetLocationMaster();
                //   LoadTableData();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }