Example #1
0
        /// <summary>
        /// 初始化医生数据
        /// </summary>
        /// <param name="sql">sql语句</param>
        /// <param name="flag">是否是红黄灯交错,还是单个红,黄灯</param>
        private void InitLigth(string sql, bool flag)
        {
            DataSet ds = App.GetDataSet(sql);

            if (ds != null)
            {
                foreach (DataRow row in ds.Tables[0].Rows)
                {
                    int    yellow      = Convert.ToInt32(row["黄灯"].ToString());
                    int    red         = Convert.ToInt32(row["红灯"].ToString());
                    string doctor_name = row["sick_doctor_name"].ToString();
                    string doctor_id   = row["sick_doctor_id"].ToString();
                    if (flag)
                    {
                        UcMerger uc = new UcMerger(doctor_name, yellow, imgYel, red, imgRed, "", true);
                        AddUcLight(tabControlPanel2, uc);
                    }
                    else
                    {
                        int num = 0;
                        if (yellow == 0)
                        {
                            num = red;
                        }
                        else
                        {
                            num = yellow;
                        }
                        UcLight uc = new UcLight(doctor_name, num, imgYel, "", true);
                        AddUcLight(tabControlPanel2, uc);
                    }
                }
            }
        }
Example #2
0
        /// <summary>
        /// 补录医生信息加载
        /// </summary>
        /// <param name="sql"></param>
        private void InitLigth(string sql)
        {
            DataSet ds = App.GetDataSet(sql);

            if (ds != null)
            {
                foreach (DataRow row in ds.Tables[0].Rows)
                {
                    int     bl          = Convert.ToInt32(row["补录"].ToString());
                    string  doctor_name = row["sick_doctor_name"].ToString();
                    string  doctor_id   = row["sick_doctor_id"].ToString();
                    UcLight uc          = new UcLight(doctor_name, bl, imgbl, "", true);
                    AddUcLight(tabControlPanel2, uc);
                }
            }
        }