Example #1
0
 public AddContractorForm(Contractor contr)
 {
     InitializeComponent();
     controller                 = new AddContractorController();
     contractor                 = contr;
     textBoxName.Text           = contr.Name;
     textBoxSubdivision.Text    = contr.Sub;
     richTextBoxYuradress.Text  = contr.YurAdress;
     richTextBoxFactadress.Text = contr.FactAdress;
     textBoxIndex.Text          = contr.Index.ToString() == "0" ? string.Empty : contr.Index.ToString();
     maskedTextBoxPhone.Text    = contr.Phone;
     textBoxINN.Text            = contr.Inn;
     this.Text                       = "Изменение контрагента";
     textBoxName.BackColor           = Color.White;
     richTextBoxFactadress.BackColor = Color.White;
     saveButton.Enabled              = true;
     saveButton.BackColor            = Color.DarkOrange;
 }
Example #2
0
 private void richTextBoxFactadress_TextChanged(object sender, EventArgs e)
 {
     saveButton.Enabled              = controller.checkSaveForAll(textBoxName.Text, richTextBoxFactadress.Text, textBoxIndex.Text, textBoxINN.Text, maskedTextBoxPhone.Text);
     saveButton.BackColor            = controller.checkSaveForAll(textBoxName.Text, richTextBoxFactadress.Text, textBoxIndex.Text, textBoxINN.Text, maskedTextBoxPhone.Text) ? Color.DarkOrange : Color.LightBlue;
     richTextBoxFactadress.BackColor = !AddContractorController.isEmpty(richTextBoxFactadress.Text.Replace(" ", "")) ? Color.White : Color.LightBlue;
 }
Example #3
0
 public AddContractorForm()
 {
     InitializeComponent();
     controller = new AddContractorController();
     maskedTextBoxPhone.TextChanged += maskedTextBoxPhone_TextChanged;
 }
Example #4
0
 private void richTextBoxFactadress_TextChanged(object sender, EventArgs e)
 {
     saveButton.Enabled              = controller.checkSaveForAll(textBoxName.Text, richTextBoxFactadress.Text, textBoxIndex.Text, textBoxINN.Text);
     saveButton.BackColor            = controller.checkSaveForAll(textBoxName.Text, richTextBoxFactadress.Text, textBoxIndex.Text, textBoxINN.Text) ? Color.DarkOrange : Color.Red;
     richTextBoxFactadress.BackColor = !AddContractorController.isEmpty(richTextBoxFactadress.Text.Trim()) ? Color.White : Color.Red;
 }
Example #5
0
 public AddContractorForm()
 {
     InitializeComponent();
     controller = new AddContractorController();
 }