Beispiel #1
0
        public ReestrForm(Purchase purchase, bool copy = false) : base()
        {
            InitializeComponent();
            InitializeAuraForm();
            this.purchase = purchase;
            LoadCatalogs();
            creator = new Controller.CommandStringCreator("Purchases", purchase.id.ToString());

            if (purchase.id < 1)
            {
                //если закупка новая, она должна автоматически создаваться
                //для того закона, для которого создан пользователь
                purchase.law = Program.user.roleID;
                creator.AddChange("law", purchase.law.ToString());
                creator.AddChange("statusID", purchase.statusID.ToString());
                creator.AddChange("colorMark", purchase.colorMark.ToString());
                creator.AddChange("withoutPurchase", purchase.withoutPurchase.ToString());
                showLogsButton.Hide();
            }

            FillForm();

            if (copy)
            {
                LoadFromCopy();
                creator.AddChange("organizationID", purchase.organizationID.ToString());
            }
        }
Beispiel #2
0
 public ContractForm(Contract contract) : base()
 {
     InitializeComponent();
     InitializeAuraForm();
     creator = new Controller.CommandStringCreator("Contracts", contract.id.ToString());
     creator.AddChange("organisationID", contract.organisationID.ToString());
     this.contract = contract;
     Fill(contract);
 }
        public DocumentationNodeForm(DocumentationNode node)
        {
            InitializeComponent();
            InitializeAuraForm();
            documentationNode = node;
            creator           = new Controller.CommandStringCreator("Documentation", node.id.ToString());

            Fill();

            text.Focus();
        }
        public PurchasesDataBaseForm() : base()
        {
            InitializeComponent();
            InitializeAuraForm();

            LoadCatalogs();
            creator = new Controller.CommandStringCreator("Purchases");
            CreateTable();
            InitContextMenuStrip();
            ClearFilters();
            ReloadTable();
        }
Beispiel #5
0
 private void ToExcelForm_Load(object sender, EventArgs e)
 {
     RefreshFilePathText();
     creator = new Controller.CommandStringCreator();
     InitToolTips();
     LoadCatalogs();
     InitOrgContextMenuStrip();
     InitPurContextMenuStrip();
     InitializeSaveFileDialog();
     sqlQueryTextBox.Text = "SELECT * FROM Organisations";
     ClearOrgsPanel();
     ClearPurPanel();
 }
Beispiel #6
0
        private bool onlyShowing;       //режим отображения таблицы.
                                        //Если true - клик по организации открывает её
                                        //Если false - клик по организации возвращает её ИД


        public OrganisationsDataBaseForm(bool onlyShow = true) : base()
        {
            InitializeComponent();
            InitializeRightMenuButtonMenu();

            LoadCatalogs();
            CreateTable();
            InitToolTips();
            InitContextMenuStrip();
            creator = new Controller.CommandStringCreator("Organisations");
            ReloadTable();
            onlyShowing = onlyShow;
        }
        private Color notReadyColor = Color.LightGray;  //цвет кнопки для несделанного отчета


        public ReportsDataBaseForm() : base()
        {
            InitializeComponent();
            InitializeAuraForm();
            InitializeToolTips();
            creator = new Controller.CommandStringCreator("Reports", "");

            month = DateTime.Now.Month.ToString();
            year  = DateTime.Now.Year.ToString();

            LoadCatalogs();

            SetCombobox(monthComboBox, month);
            SetCombobox(yearComboBox, year);

            ReloadTable();
        }