Exemplo n.º 1
0
 public QC_Reports()
 {
     InitializeComponent();
     AppHelper AH = new AppHelper();
    
                 IsInOANet IsOANet = new IsInOANet();
     string Url = AH.ReadConfig("appSettings", "NetCheck");
     if (IsOANet.IsCanConnect(Url))
     {
         string CamText = AH.ReadConfig("appSettings", "Data_for_QCReports");
         DataSet ds = new DataSet();
         ds = Func.DBbind(CamText);
         // ds = Func.DBbind("select '甲' as name,50 as value union all select '乙',60 union all select '丙',70 union all select '丁',80");
         Func.DrawingChart("品質不良報表", this.panel1, ds, ChartType.Histogram, 0, 100, 10, "");
     }
     else
     {
         MessageBox.Show("無法連接到OA 網絡請檢查網絡連接", "系統提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
         this.Close();
     }
 }
Exemplo n.º 2
0
        //public string GetRNum(string Input)
        //{
        //    string Check="";
        //    if (Input.Length==0) {
        //        Check = "";
        //    }
        //    if (Code_Check(Input))
        //    {
        //        Check = Input;
        //    }
        //     return Check;
        //}
        //public string Code_Check()
        //{ 
        //    bool IsExist=false;
        //    AppHelper app=new AppHelper();
        //    app.ReadConfig("appSettings", "connectionstring");
        //    Data_Factory df = new Data_Factory();
            
        //    return IsExist;
        //}
        public bool Code_Check()
        {
            bool IsExist = false;
            AppHelper app = new AppHelper();
            app.ReadConfig("appSettings", "connectionstring");
            Data_Factory df = new Data_Factory();

            return IsExist;
        }