Ejemplo n.º 1
0
        public C1ComboBox setCboLabProce(C1ComboBox c, StatusLab statuslab)
        {
            ComboBoxItem item = new ComboBoxItem();
            DataTable    dt   = selectC1(statuslab);
            //String aaa = "";
            ComboBoxItem item1 = new ComboBoxItem();

            item1.Text  = "";
            item1.Value = "000";
            c.Items.Clear();
            c.Items.Add(item1);
            //for (int i = 0; i < dt.Rows.Count; i++)
            foreach (DataRow row in dt.Rows)
            {
                item       = new ComboBoxItem();
                item.Text  = row[proce.proce_name_t].ToString();
                item.Value = row[proce.proce_id].ToString();

                c.Items.Add(item);
            }
            return(c);
        }
Ejemplo n.º 2
0
        public DataTable selectC1(StatusLab statuslab)
        {
            DataTable dt  = new DataTable();
            String    sql = "";

            if (statuslab == StatusLab.OPUProcedure)
            {
                sql = "select proce." + proce.pkField + ",proce." + proce.proce_name_t + " " +
                      "From " + proce.table + " proce " +
                      " " +
                      "Where proce." + proce.active + " ='1'  and proce." + proce.status_lab + "='OPU'";
            }
            else if (statuslab == StatusLab.FETProcedure)
            {
                sql = "select proce." + proce.pkField + ",proce." + proce.proce_name_t + " " +
                      "From " + proce.table + " proce " +
                      " " +
                      "Where proce." + proce.active + " ='1'  and proce." + proce.status_lab + "='FET'";
            }
            dt = conn.selectData(conn.conn, sql);

            return(dt);
        }
Ejemplo n.º 3
0
        public DataTable selectAll1(StatusLab statuslab)
        {
            DataTable dt  = new DataTable();
            String    sql = "";

            if (statuslab == StatusLab.OPUProcedure)
            {
                sql = "select dept.proce_id, dept.proce_code, dept.proce_name_t, dept.remark  " +
                      "From " + proce.table + " dept " +
                      " " +
                      "Where dept." + proce.active + " ='1' and dept." + proce.status_lab + "='OPU'";
            }
            else if (statuslab == StatusLab.FETProcedure)
            {
                sql = "select dept.proce_id, dept.proce_code, dept.proce_name_t, dept.remark  " +
                      "From " + proce.table + " dept " +
                      " " +
                      "Where dept." + proce.active + " ='1' and dept." + proce.status_lab + "='FET'";
            }
            dt = conn.selectData(conn.conn, sql);

            return(dt);
        }