Пример #1
0
        private void ManufacturingUserControl_Load(object sender, EventArgs e)
        {
            WbGridView.RestoreLayoutFromRegistry(IHelper.reg_layout_path + "ManufacturingUserControl\\WbGridView");
            DeboningGridView.RestoreLayoutFromRegistry(IHelper.reg_layout_path + "ManufacturingUserControl\\DeboningGridView");

            if (!DesignMode)
            {
                wbContentTab.ShowTabHeader = DevExpress.Utils.DefaultBoolean.False;

                WhComboBox.Properties.DataSource = new List <object>()
                {
                    new { WId = "*", Name = "Усі" }
                }.Concat(DBHelper.WhList.Select(s => new { WId = s.WId.ToString(), s.Name }).ToList());
                WhComboBox.EditValue = "*";
                DebWhComboBox.Properties.DataSource    = WhComboBox.Properties.DataSource;
                DebWhComboBox.EditValue                = "*";
                PrepRawMatWhList.Properties.DataSource = WhComboBox.Properties.DataSource;
                PrepRawMatWhList.EditValue             = "*";

                wbSatusList.Properties.DataSource = new List <object>()
                {
                    new { Id = -1, Name = "Усі" }, new { Id = 0, Name = "Актуальний" }, new { Id = 2, Name = "Розпочато виробництво" }, new { Id = 1, Name = "Закінчено виробництво" }
                };
                wbSatusList.EditValue = -1;
                DebSatusList.Properties.DataSource         = wbSatusList.Properties.DataSource;
                DebSatusList.EditValue                     = -1;
                PrepRawMatStatusList.Properties.DataSource = wbSatusList.Properties.DataSource;
                PrepRawMatStatusList.EditValue             = -1;

                lookUpEdit2.Properties.DataSource = new List <object>()
                {
                    new { Id = -1, Name = "Усі" }, new { Id = 1, Name = "Розпочато виробництво" }, new { Id = 0, Name = "Актуальний" }
                };
                lookUpEdit2.EditValue = -1;

                wbStartDate.EditValue         = DateTime.Now.Date.AddDays(-1);
                wbEndDate.EditValue           = DateTime.Now.Date.SetEndDay();
                DebStartDate.EditValue        = DateTime.Now.Date.AddDays(-1);
                DebEndDate.EditValue          = DateTime.Now.Date.SetEndDay();
                PrepRawMatStartDate.EditValue = DateTime.Now.Date.AddDays(-1);
                PrepRawMatEndDate.EditValue   = DateTime.Now.Date.SetEndDay();

                PlanStartDate.EditValue = DateTime.Now.Date.AddDays(-1);
                PlanEndDate.EditValue   = DateTime.Now.Date.SetEndDay();

                dateEdit2.EditValue = DateTime.Now.Date.AddDays(-30);
                dateEdit1.EditValue = DateTime.Now.Date.SetEndDay();

                DocsTreeList.DataSource = DB.SkladBase().GetManufactureTree(DBHelper.CurrentUser.UserId).ToList();
                DocsTreeList.ExpandAll(); //ExpandToLevel(0);
            }
        }
Пример #2
0
 public void SaveGridLayouts()
 {
     WbGridView.SaveLayoutToRegistry(IHelper.reg_layout_path + "ManufacturingUserControl\\WbGridView");
     DeboningGridView.SaveLayoutToRegistry(IHelper.reg_layout_path + "ManufacturingUserControl\\DeboningGridView");
 }