示例#1
0
 public GroupChangeForm(Element inp)
 {
     InitializeComponent();
     el             = inp;
     cmb.DataSource = SQL_Class.get_data_Source("select " + el.name + " from " + el.addtable);
     lb.Text        = el.name;
 }
 private void OS_CmBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (OS_CmBox.DataSource != null)
     {
         if (SQL_Class.get_data_Source("select OS from ostable").Contains(OS_CmBox.SelectedItem.ToString()))
         {
             request_mas_of_base_elements();
         }
     }
 }
 private void Owner_CmBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (Owner_CmBox.DataSource != null)
     {
         if (SQL_Class.get_data_Source("select Owner from ownertable").Contains(Owner_CmBox.SelectedItem.ToString()))
         {
             mas = Compare_Pare_Mas.get_base_elements(SQL_Class.ReadValueInt32("select ID from ownertable where Owner='" + Owner_CmBox.SelectedItem.ToString() + "'"));
         }
     }
 }
        public BaseShow()
        {
            InitializeComponent();


            Type_CmBox.DataSource   = SQL_Class.get_data_Source("select Type from typetable");
            Place_CmBox.DataSource  = SQL_Class.get_data_Source("select Place from placetable");
            Place2_CmBox.DataSource = SQL_Class.get_data_Source("select Place2 from place2table");
            OS_CmBox.DataSource     = SQL_Class.get_data_Source("select OS from ostable");
            Owner_CmBox.DataSource  = SQL_Class.get_data_Source("select Owner from ownertable");


            Filter_Clear();



            List <Element> lst = new List <Element>();

            lst.Add(new Element("itemtable", "ID", false, false, ""));
            lst.Add(new Element("itemtable", "Serial", true, false, ""));                         //
            lst.Add(new Element("itemtable", "Serial2", true, false, ""));                        //

            lst.Add(new Element("itemtable", "Mark", false, true, "marktable"));
            lst.Add(new Element("itemtable", "Type", false, true, "typetable"));
            lst.Add(new Element("itemtable", "Place", false, true, "placetable"));
            lst.Add(new Element("itemtable", "Place2", false, true, "place2table"));
            lst.Add(new Element("itemtable", "Status", false, true, "statustable"));
            lst.Add(new Element("itemtable", "OS", false, true, "ostable"));

            lst.Add(new Element("itemtable", "Text", true, false, ""));  //
            lst.Add(new Element("itemtable", "Text2", true, false, "")); //
            lst.Add(new Element("itemtable", "Text3", true, false, "")); //
            lst.Add(new Element("itemtable", "Text4", true, false, "")); //
            lst.Add(new Element("itemtable", "Text5", true, false, "")); //
            lst.Add(new Element("itemtable", "Text6", true, false, "")); //

            lst.Add(new Element("itemtable", "Prise", true, false, "")); //
            lst.Add(new Element("itemtable", "Date", true, false, ""));  //

            lst.Add(new Element("itemtable", "Owner", false, true, "ownertable"));

            tbl = new Table(lst, dgv, "itemtable");
            Load_Data_With_Filters();
            paint_dgv();
        }
 private void CompareForm_Load(object sender, EventArgs e)
 {
     Owner_CmBox.DataSource = SQL_Class.get_data_Source("select Owner from ownertable");
     OS_CmBox.DataSource    = SQL_Class.get_data_Source("select OS from ostable");
 }
 private void CompareForm_Load(object sender, EventArgs e)
 {
     //mas = Compare_Pare_Mas.get_base_elements();
     Owner_CmBox.DataSource = SQL_Class.get_data_Source("select Owner from ownertable");
     OS_CmBox.DataSource    = SQL_Class.get_data_Source("select OS from ostable");
 }
 public static List <string> get_ordered_datasource(string name, string table)
 {
     return(SQL_Class.get_data_Source("select " + name + " from " + table + "  order by " + name));
 }