예제 #1
0
        private void frmAidChooseDoct_Load(object sender, EventArgs e)
        {
            long          l         = 0;
            clsDcl_Charge objCharge = new clsDcl_Charge();
            DataTable     dt;

            if (EmpTypeId > 0)
            {
                l = objCharge.m_lngGetEmployee(out dt, EmpTypeId);
            }
            else
            {
                l = objCharge.m_lngGetEmployee(out dt);
            }
            if (l > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataRow  dr   = dt.Rows[i];
                    string[] sarr = new string[4];

                    sarr[0] = "F";
                    sarr[1] = Convert.ToString(i + 1);
                    sarr[2] = dr["empno_chr"].ToString().Trim();
                    sarr[3] = dr["lastname_vchr"].ToString().Trim();

                    int row = this.dtDoct.Rows.Add(sarr);
                    this.dtDoct.Rows[row].Tag = dr;
                }
            }

            this.txtVal.Focus();
        }
예제 #2
0
        /// <summary>
        /// 获取收款员ID和姓名
        /// </summary>
        /// <returns></returns>
        public bool m_blnGetEmpIDName()
        {
            if (MonitorFlag)
            {
                if (this.txtOperCode.Text.Trim() == "")
                {
                    MessageBox.Show("请输入收款员工号。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    this.txtOperCode.Focus();
                    return(false);
                }
                else
                {
                    if (EmpCode != this.txtOperCode.Text.Trim())
                    {
                        EmpCode = this.txtOperCode.Text.Trim();

                        clsDcl_Charge objCharge = new clsDcl_Charge();
                        long          l         = objCharge.m_lngGetEmployee(EmpCode, out EmpID, out EmpName);
                        objCharge = null;
                        if (l > 0)
                        {
                        }
                        else
                        {
                            return(false);
                        }
                    }
                }
            }

            return(true);
        }