Example #1
0
        /// <summary>
        /// 窗口初始化
        /// </summary>
        public void m_mthInit()
        {
            #region 获取身份(费别)列表;职称列表。
            DataTable dt;
            long      l = this.objSvcCharge.m_lngGetPayTypeInfo(out dt);
            if (l > 0)
            {
                int     row = 0;
                DataRow dr;

                string[] sarr = new string[4];
                sarr[0] = "0000";
                sarr[1] = "公用";
                sarr[2] = "启用";
                sarr[3] = "0000";
                this.m_objViewer.dtgPayType.Rows.Add(sarr);

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    dr = dt.Rows[i];

                    sarr[0] = dr["paytypeno_vchr"].ToString().Trim();
                    sarr[1] = dr["paytypename_vchr"].ToString().Trim();
                    if (dr["isusing_num"].ToString() == "1")
                    {
                        sarr[2] = "启用";
                    }
                    else
                    {
                        sarr[2] = "停用";
                    }
                    sarr[3] = dr["paytypeid_chr"].ToString().Trim();

                    row = this.m_objViewer.dtgPayType.Rows.Add(sarr);

                    if (sarr[2] == "停用")
                    {
                        this.m_objViewer.dtgPayType.Rows[row].DefaultCellStyle.ForeColor = Color.Red;
                    }

                    if (Math.IEEERemainder(Convert.ToDouble(i), 2) == 0)
                    {
                        this.m_objViewer.dtgPayType.Rows[row].DefaultCellStyle.BackColor = clsPublic.CustomBackColor;
                    }
                }

                l = this.objSvc.m_lngGetDoctorDuty(out dtDuty);
                if (l > 0)
                {
                    this.m_objViewer.cboDuty.Items.Add("全部");

                    for (int i = 0; i < dtDuty.Rows.Count; i++)
                    {
                        this.m_objViewer.cboDuty.Items.Add(dtDuty.Rows[i]["dictname_vchr"].ToString());
                    }
                }
            }
            #endregion

            this.m_objViewer.cboRegStatus.SelectedIndex  = 0;
            this.m_objViewer.cboRecipeType.SelectedIndex = 0;
            this.m_objViewer.cboDuty.SelectedIndex       = 0;

            this.m_objViewer.mskBeginTime.Text = "00:00";
            this.m_objViewer.mskEndTime.Text   = "23:59";
            this.m_objViewer.panelItem.Height  = 0;

            this.m_objViewer.btnSave.Tag = "";

            this.m_mthGetCat();
            //加载科室
            objSvcCharge.m_lngGetDepts(out dtbDepts);
        }