Example #1
0
 public void LoadLookupLan(DevExpress.XtraEditors.LookUpEdit cb, string tencot1, string tencot2, string tencot3, string tencot4, string truongcot1, string truongcot2, string truongcot3, string truongcot4, string proc, string DisplayMember, string ValueMember)
 {
     try
     {
         cb.Refresh();
         cb.Properties.Columns.Clear();
         cb.Properties.DataSource    = con.DoDuLieuProcedure(proc);
         cb.Properties.DisplayMember = DisplayMember;
         cb.Properties.ValueMember   = ValueMember;
         cb.Properties.Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[]
         {
             new DevExpress.XtraEditors.Controls.LookUpColumnInfo(truongcot1, tencot1),
             new DevExpress.XtraEditors.Controls.LookUpColumnInfo(truongcot2, tencot2),
             new DevExpress.XtraEditors.Controls.LookUpColumnInfo(truongcot3, tencot3),
             new DevExpress.XtraEditors.Controls.LookUpColumnInfo(truongcot4, tencot4),
         });
         cb.Properties.Columns[truongcot1].Width = 100;
         cb.Properties.Columns[truongcot2].Width = 300;
         cb.Properties.Columns[truongcot3].Width = 300;
         cb.Properties.Columns[truongcot4].Width = 300;
         cb.ClosePopup();
         cb.ItemIndex = 1;
     }
     catch (Exception ex)
     {
         logger.Error(ex);
     }
 }
Example #2
0
        private void Frm_ConfigLane_Load(object sender, EventArgs e)
        {
            ConnectDb con = new ConnectDb();
            DataTable dt  = con.DoDuLieuProcedure("proc_Monitor_ConfigChooseLane");

            gridControl1.DataSource = dt;
            CreateUnboundColumn();
            ritem             = new RepositoryItemCheckEdit();
            ritem.AllowGrayed = false;
        }
Example #3
0
        private void Frm_Setting_Load(object sender, EventArgs e)
        {
            try
            {
                ConnectDb con = new ConnectDb();
                DataTable dt  = con.DoDuLieuProcedure("proc_Monitor_ConfigChooseLane");
                dt.Columns.Add("IsMonitor", typeof(bool));
                gridControl1.DataSource = dt;
                CreateUnboundColumn();
                ritem             = new RepositoryItemCheckEdit();
                ritem.AllowGrayed = false;

                checkTuDongPhatHienNghiNgo.AutoSizeInLayoutControl = true;

                // doc file setting.xml]
                set_TimeRunSlideShow.Value = 1;
                set_TimeLoadData.Value     = 1;
                GetInfoSetting();
            }
            catch (Exception ex)
            {
                logger.Error("Error load setting by: " + ex);
            }
        }