예제 #1
0
 internal void Delete(Form form, int id, IMaintainData maintaianControl)
 {
     MaintainData = maintaianControl;
     DataStatus   = 3;
     using (var editor = new BlankForm())
     {
         Text = string.Format("{0}Delete Employee Position", "");
         PopulateInterfaceFromModel(id);
         SetDeleteButton();
         editor.ShowDialogEditor(form, this);
     }
 }
예제 #2
0
 internal void Edit(Form form, int id, IMaintainData maintaianControl)
 {
     MaintainData = maintaianControl;
     DataStatus   = 2;
     using (var editor = new BlankForm())
     {
         Text = string.Format("{0}Edit Payroll Group", "");
         PopulateInterfaceFromModel(id);
         SetEditButton();
         editor.ShowDialogEditor(form, this);
     }
 }
예제 #3
0
 public static void Error(IWin32Window windowForm, string title, string message)
 {
     using (var blankForm = new BlankForm())
     {
         using (var messageForm = new MessageForm())
         {
             messageForm.SetButton(EnumButton.OK);
             messageForm.SetMessage(message);
             messageForm.SetTitle(title);
             messageForm.SetIcon(EnumIcon.Error);
             blankForm.ShowDialogEditor(windowForm, messageForm);
         }
     }
 }
예제 #4
0
        internal void Create(Form form, IMaintainData maintaianControl)
        {
            MaintainData = maintaianControl;
            var maintainData = form as IMainConfiguration;

            if (maintainData != null)
            {
                createdBy.Text    = maintainData.CurrentUserName;
                createdDate.Value = DateTime.Now;
            }
            DataStatus = 1;
            using (var editor = new BlankForm())
            {
                Text = string.Format("{0}Create New Employee Position", "");
                SetCreateButton();
                editor.ShowDialogEditor(form, this);
            }
        }
예제 #5
0
 internal void Edit(Form form, int id, IMaintainData maintaianControl)
 {
     MaintainData = maintaianControl;
     DataStatus   = 2;
     using (var editor = new BlankForm())
     {
         Text = string.Format("{0}Edit Employee", "");
         PopulateInterfaceFromModel(id);
         var maintainData = form as IMainConfiguration;
         if (maintainData != null)
         {
             modifiedBy.Text    = maintainData.CurrentUserName;
             modifiedDate.Value = DateTime.Now;
         }
         SetEditButton();
         editor.ShowDialogEditor(form, this);
     }
 }
 internal void Create(Form form, IMaintainData maintaianControl)
 {
     MaintainData      = maintaianControl;
     mainConfiguration = form as IMainConfiguration;
     DataStatus        = 1;
     using (var editor = new BlankForm())
     {
         Text = string.Format("{0}Create New Payroll Group", "");
         SetCreateButton();
         recordId.Text     = DefaultValue.AUTO_GENERATE_TEXT;
         recordId.ReadOnly = true;
         LoadComboItem();
         //kDataGridView1.UserAddedRow += KDataGridView1UserAddedRow;
         kDataGridView1.RowsAdded       += KDataGridView1RowsAdded;
         kDataGridView1.CellEndEdit     += KDataGridView1CellEndEdit;
         kDataGridView1.UserDeletingRow += KDataGridView1UserDeletingRow;
         editor.ShowDialogEditor(form, this);
     }
 }
예제 #7
0
        public static DialogResult Ask(IWin32Window windowForm, string title, string message, bool yesButtonFocus = false)
        {
            using (var blankForm = new BlankForm())
            {
                using (var messageForm = new MessageForm())
                {
                    messageForm.SetButton(EnumButton.YesNo);
                    messageForm.SetMessage(message);
                    messageForm.SetTitle(title);
                    messageForm.SetIcon(EnumIcon.Ask);

                    if (!yesButtonFocus)
                    {
                        messageForm.AcceptButton = messageForm.buttonYes;
                    }
                    messageForm.CancelButton = messageForm.buttonNo;
                    return(blankForm.ShowDialogEditor(windowForm, messageForm));
                }
            }
        }
        internal DialogResult Create(Form form, IMaintainData maintaianControl)
        {
            MaintainData = maintaianControl;
            var maintainData = form as IMainConfiguration;

            if (maintainData != null)
            {
                //createdBy.Text = maintainData.CurrentUserName;
                //createdDate.Value = DateTime.Now;
            }
            DataStatus = 1;

            using (var editor = new BlankForm())
            {
                Text = string.Format("{0}Add Payroll Item", "");
                SetCreateButton();
                editor.ShowDialogEditor(form, this);
                return(DialogResult);
            }
        }