Esempio n. 1
0
        private void imbt_SelectGroup_Click(object sender, EventArgs e)
        {
            CheckListBoxFlag = 0;
            List <string> LsCraft           = new List <string>();
            Dictionary <string, object> mst = new Dictionary <string, object>();
            DataTable dt = craftinfo.GetAllCraftInfo(mst).Tables[0];

            DataTable temp = null;

            if (dt.Rows.Count > 0)
            {
                dt   = FrmBLL.publicfuntion.DataTableToSort(dt, "CRAFTNAME");
                temp = FrmBLL.publicfuntion.getNewTable(dt, string.Format("TESTFLAG<>'{0}'", "2"));
            }
            DataTable dtLine = new DataTable();

            dtLine.Columns.Add("SECTION", typeof(string));
            dtLine.Columns.Add("GROUP", typeof(string));
            dtLine.Columns.Add("STATION", typeof(string));
            foreach (DataRow dr in temp.Rows)
            {
                LsCraft.Add(dr["CRAFTNAME"].ToString());
            }

            Frm_CheckListBox clb = new Frm_CheckListBox(this, LsCraft);

            clb.ShowDialog();
        }
Esempio n. 2
0
        //  [WebMethod(MessageName = "GetRouteToXML")]
        public string Get_Route_Info(string SECTION_NAME, string TEST_FLAG, string CHECK_TOOLS_FLAG)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            if (!string.IsNullOrEmpty(SECTION_NAME))
            {
                dic.Add("BEWORKSEG", SECTION_NAME);
            }
            if (!string.IsNullOrEmpty(TEST_FLAG))
            {
                dic.Add("TESTFLAG", TEST_FLAG);
            }
            if (!string.IsNullOrEmpty(CHECK_TOOLS_FLAG))
            {
                dic.Add("CHECKTOOLSFLAG", CHECK_TOOLS_FLAG);
            }
            DataTable dt      = craftinfo.GetAllCraftInfo(dic).Tables[0];
            DataTable dtcraft = new DataTable();
            int       x       = 0;

            foreach (DataRow dr in dt.Rows)
            {
                try
                {
                    dtcraft.Columns.Add(dr["craftname"].ToString(), typeof(string));
                    if (dtcraft.Rows.Count == 0)
                    {
                        dtcraft.Rows.Add(dr["checktoolsflag"].ToString());
                    }
                    else
                    {
                        dtcraft.Rows[0][x++] = dr["checktoolsflag"].ToString();
                    }
                }
                catch
                {
                }
            }
            DataSet ds = new DataSet();

            ds.Tables.Add(dtcraft);
            return(ds.GetXml());
        }
Esempio n. 3
0
        public List <string> Get_All_Station()
        {
            List <string> ListStation       = new List <string>();
            Dictionary <string, object> dic = new Dictionary <string, object>();
            DataTable dt = craftinfo.GetAllCraftInfo(dic).Tables[0];

            if (dt.Rows.Count > 0)
            {
                DataView dv = new DataView(dt);
                dv.Sort = "CRAFTNAME";
                DataTable dt2 = dv.ToTable();
                foreach (DataRow dr in dt2.Rows)
                {
                    if (dr["TESTFLAG"].ToString() == "0" || dr["TESTFLAG"].ToString() == "3")
                    {
                        ListStation.Add(dr["CRAFTNAME"].ToString());
                    }
                }
            }
            return(ListStation);
        }
Esempio n. 4
0
 public byte[] GetAllCraftInfo()
 {
     return(mlc.GetDataSetSurrogateZipBytes(mcraftinfo.GetAllCraftInfo(null)));
 }