public A_AddHistoryAttendance_Add(A_AddHistoryAttendance frm)
        {
            InitializeComponent();
            Afr = frm;
            blIsAdd = frm._isAdd;

            bindcombox(ddlClassAdd, ddlTimerIntervalAdd);

            if (blIsAdd)        //补单
            {
                GetDeptInfo();          //部门
                GetEmpName(cmbDept);    //姓名
            }
            else                //修改
            {
                if (Afr._id != null && Afr._id != "")
                {
                    DataSet dsHisA;
                    using (dsHisA = new DataSet())
                    {
                        dsHisA = aBLL.GetEmployeeAttendanceHistoryList(" and H.ID=" + Afr._id, 1, 1,frm.dtpStartTime.Value.ToString("yyyyM"),frm.dtpStartTime.Value.ToString("yyyyM"), out strErr);
                        if (dsHisA != null && dsHisA.Tables.Count > 0)
                        {
                            GetDeptInfo();          //部门

                            cmbDept.SelectedValue = dsHisA.Tables[0].Rows[0]["DeptID"].ToString();

                            GetEmpName(cmbDept);    //姓名
                            cmbEmpName.Text = dsHisA.Tables[0].Rows[0]["EmployeeName"].ToString();

                            txtCodeSenderAddress.Text = dsHisA.Tables[0].Rows[0]["BlockID"].ToString();
                            ddlClassAdd.SelectedValue = dsHisA.Tables[0].Rows[0]["ClassID"].ToString();
                            dtpBeginTimeAdd.Text = dsHisA.Tables[0].Rows[0]["BeginWorkTime"].ToString();
                            dtpEndTimeAdd.Text = dsHisA.Tables[0].Rows[0]["EndWorkTime"].ToString();
                            txtRemarkAdd.Text = dsHisA.Tables[0].Rows[0]["Remark"].ToString();
                            ddlTimerIntervalAdd.Text = dsHisA.Tables[0].Rows[0]["ClassShortName"].ToString();
                        }
                    }
                }
                cmbDept.Enabled = false;
                txtCodeSenderAddress.Enabled = false;
                cmbEmpName.Enabled = false;
                btnReset.Enabled = false;
            }
        }
        public A_AddHistoryAttendance_Add(A_AddHistoryAttendance frm)
        {
            InitializeComponent();
            Afr     = frm;
            blIsAdd = frm._isAdd;

            bindcombox(ddlClassAdd, ddlTimerIntervalAdd);

            if (blIsAdd)             //补单
            {
                GetDeptInfo();       //部门
                GetEmpName(cmbDept); //姓名
            }
            else                     //修改
            {
                if (Afr._id != null && Afr._id != "")
                {
                    DataSet dsHisA;
                    using (dsHisA = new DataSet())
                    {
                        dsHisA = aBLL.GetEmployeeAttendanceHistoryList(" and H.ID=" + Afr._id, 1, 1, frm.dtpStartTime.Value.ToString("yyyyM"), frm.dtpStartTime.Value.ToString("yyyyM"), out strErr);
                        if (dsHisA != null && dsHisA.Tables.Count > 0)
                        {
                            GetDeptInfo();          //部门

                            cmbDept.SelectedValue = dsHisA.Tables[0].Rows[0]["DeptID"].ToString();

                            GetEmpName(cmbDept);    //姓名
                            cmbEmpName.Text = dsHisA.Tables[0].Rows[0]["EmployeeName"].ToString();

                            txtCodeSenderAddress.Text = dsHisA.Tables[0].Rows[0]["BlockID"].ToString();
                            ddlClassAdd.SelectedValue = dsHisA.Tables[0].Rows[0]["ClassID"].ToString();
                            dtpBeginTimeAdd.Text      = dsHisA.Tables[0].Rows[0]["BeginWorkTime"].ToString();
                            dtpEndTimeAdd.Text        = dsHisA.Tables[0].Rows[0]["EndWorkTime"].ToString();
                            txtRemarkAdd.Text         = dsHisA.Tables[0].Rows[0]["Remark"].ToString();
                            ddlTimerIntervalAdd.Text  = dsHisA.Tables[0].Rows[0]["ClassShortName"].ToString();
                        }
                    }
                }
                cmbDept.Enabled = false;
                txtCodeSenderAddress.Enabled = false;
                cmbEmpName.Enabled           = false;
                btnReset.Enabled             = false;
            }
        }