public void AddTable(string tableName) { if (!FormTables.Contains(tableName)) { FormTables.Add(tableName); } }
//ACTION YES private void btnYes_Click(object sender, EventArgs e) { if (_codUser != "") { if (txtCodUser.Text != "") { if (_codUser == txtCodUser.Text) { FormTables frm = new FormTables(); frm.MetroStryleManagerForm.Theme = metroStyleManager.Theme; frm.MetroStryleManagerForm.Style = metroStyleManager.Style; frm.Show(); //To clear txtCodUser.Text = ""; } else { //To show info message msg = new Msg(); msg.Ok_Info("El clave ingresada no es correcta."); //To clear txtCodUser.Text = ""; ///MetroMessageBox.Show(this, "El # de ID ingresado no es correcto ", "Error al Ingresar", MessageBoxButtons.OK, MessageBoxIcon.Error, 120); } } else { //To show info message msg = new Msg(); msg.Ok_Info("Ingrese su clave."); } } else { //To show info message msg = new Msg(); msg.Ok_Info("Usted debe hacer Clockin. Vuelva a intentarlo. "); } }
public void Update(IMenuItemUpdatable fields, out List <UpdatedField> updated) { fields.ThrowIfNull(nameof(fields)); updated = new List <UpdatedField>(); if (Name != fields.Name) { updated.Add(new UpdatedField { FieldName = nameof(Name), OldValue = Name, NewValue = fields.Name }); Name = fields.Name; } if (GroupName != fields.GroupName) { updated.Add(new UpdatedField { FieldName = nameof(GroupName), OldValue = GroupName, NewValue = fields.GroupName }); GroupName = fields.GroupName; } if (IconName != fields.IconName) { updated.Add(new UpdatedField { FieldName = nameof(IconName), OldValue = IconName, NewValue = fields.IconName }); IconName = fields.IconName; } if (SortOrder != fields.SortOrder) { updated.Add(new UpdatedField { FieldName = nameof(SortOrder), OldValue = SortOrder, NewValue = fields.SortOrder }); SortOrder = fields.SortOrder; } if (IsVisible != fields.IsVisible) { updated.Add(new UpdatedField { FieldName = nameof(IsVisible), OldValue = IsVisible, NewValue = fields.IsVisible }); IsVisible = fields.IsVisible; } if (fields.FormTables != null && fields.FormTables.Any()) { if (fields.FormTables.Length != FormTables.Count) { updated.Add(new UpdatedField { FieldName = nameof(FormTables), OldValue = $"[ {string.Join(", ", FormTables.Select(o => $"'{o.FormId}'"))} ]", NewValue = $"[ {string.Join(", ", fields.FormTables.Select(formId => $"'{formId}'"))} ]" }); // repository에서 처리 } } if (updated.Any()) { UpdatedDate = DateTimeOffset.Now; Validate(); } }