예제 #1
0
 public DebtAffairAddChangeForm(DebtAffair affair)
     : this()
 {
     this.m_DebtAffair = affair;
 }
예제 #2
0
 public void Fill(DebtAffair debtAffair)
 {
     this.m_debtAffair = debtAffair;
     this.bsDebtActionsFill();
 }
예제 #3
0
 public DebtAffairAddChangeForm()
 {
     this.m_DebtAffair = DebtAffair.Null;
     this.InitializeComponent();
 }
예제 #4
0
 private void tsInnerBtnAdd_Click(object sender, System.EventArgs e)
 {
     if (System.Windows.Forms.Application.OpenForms.get_Item(0).GetType().ToString() == "AIS.SN.UI.Provider.ProviderMainForm")
     {
         string valueByName = Setting.GetValueByName("Работа с приборами учета", "Диапазон в который разрешено редактирование в Поставщике");
         if ((System.Convert.ToInt32(valueByName.Substring(0, valueByName.IndexOf('-'))) > System.DateTime.Now.get_Day()) || (System.Convert.ToInt32(valueByName.Substring((int) (valueByName.IndexOf('-') + 1), (int) ((valueByName.get_Length() - valueByName.IndexOf('-')) - 1))) < System.DateTime.Now.get_Day()))
         {
             System.Windows.Forms.MessageBox.Show(string.Concat((string[]) new string[] { "Вам разрешено редактирование данных только с ", valueByName.Substring(0, valueByName.IndexOf('-')), " по ", valueByName.Substring((int) (valueByName.IndexOf('-') + 1), (int) ((valueByName.get_Length() - valueByName.IndexOf('-')) - 1)), " числа месяца" }), "Редактирование запрещено", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Hand);
             return;
         }
     }
     DebtAffair affair = new DebtAffair();
     DebtAffairAddChangeForm form = new DebtAffairAddChangeForm(affair);
     if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.Yes)
     {
         this.bsDebtAffairs.Add(affair);
     }
 }