Ejemplo n.º 1
0
        private void ShowInfo(string _oid)
        {
            rptEmployee0.Visible = false;
            liemployee0.Visible  = false;
            BLL.Order bll = new BLL.Order();
            DataSet   ds  = bll.GetList(0, "o_id='" + _oid + "'", "o_addDate desc");

            if (ds == null || ds.Tables[0].Rows.Count == 0)
            {
                JscriptMsg("订单不存在!", "");
                return;
            }
            DataRow dr = ds.Tables[0].Rows[0];

            labOwner.Text   = new MettingSys.BLL.department().getAreaText(dr["op_area"].ToString()) + "," + dr["op_number"] + "," + dr["op_name"];
            txtCusName.Text = dr["c_name"].ToString();
            hCusId.Value    = dr["c_id"].ToString();
            List <Model.Contacts> contactlist = new BLL.Contacts().getList("co_cid=" + hCusId.Value + "", " co_flag desc,co_id asc");

            if (contactlist != null)
            {
                ddlcontact.DataSource     = contactlist;
                ddlcontact.DataTextField  = "co_name";
                ddlcontact.DataValueField = "co_id";
                ddlcontact.DataBind();
            }
            ddlcontact.SelectedValue       = dr["o_coid"].ToString();
            txtPhone.Text                  = dr["co_number"].ToString();
            ddlcontractPrice.SelectedValue = dr["o_contractPrice"].ToString();
            txtsDate.Text                  = ConvertHelper.toDate(dr["o_sdate"]).Value.ToString("yyyy-MM-dd");
            txteDate.Text                  = ConvertHelper.toDate(dr["o_edate"]).Value.ToString("yyyy-MM-dd");
            txtAddress.Text                = dr["o_address"].ToString();
            txtContent.Text                = dr["o_content"].ToString();
            txtContract.Text               = dr["o_contractContent"].ToString();
            txtRemark.Text                 = dr["o_remarks"].ToString();
            ddlfStatus.SelectedValue       = dr["o_status"].ToString();
            //ddldstatus.SelectedValue = dr["o_dstatus"].ToString();
            ddlpushStatus.SelectedValue = dr["o_isPush"].ToString();
            labFlag.Text          = Common.BusinessDict.checkStatus()[Utils.ObjToByte(dr["o_flag"])];
            ddlflag.SelectedValue = dr["o_flag"].ToString();
            labLockStatus.Text    = Common.BusinessDict.lockStatus()[Utils.ObjToByte(dr["o_lockStatus"])];
            labfinanceCost.Text   = dr["o_financeCust"].ToString();
            txtCost.Text          = dr["o_financeCust"].ToString();
            finCost = Utils.StrToDecimal(dr["o_financeCust"].ToString(), 0);
            ddllockstatus.SelectedValue = dr["o_lockStatus"].ToString();
            labFinRemarks.Text          = dr["o_finRemarks"].ToString();
            txtFinRemark.Text           = dr["o_finRemarks"].ToString();
            labStatusTime.Text          = Utils.ObjectToStr(dr["o_statusTime"]) == "" ? "" : Utils.StrToDateTime(Utils.ObjectToStr(dr["o_statusTime"])).ToString("yyyy-MM-dd HH:mm:ss");

            #region 归属地
            string placeStr = dr["o_place"].ToString();
            if (!string.IsNullOrEmpty(placeStr))
            {
                Dictionary <string, string> areaDic      = new BLL.department().getAreaDict();
                Dictionary <string, string> orderAreaDic = new Dictionary <string, string>();
                string[] list = placeStr.Split(',');
                foreach (string item in list)
                {
                    if (areaDic.ContainsKey(item))
                    {
                        orderAreaDic.Add(item, areaDic[item]);
                    }
                }
                rptAreaList.DataSource = orderAreaDic;
                rptAreaList.DataBind();
            }
            #endregion

            #region 人员
            DataTable pdt = bll.GetPersonList(0, "op_oid='" + _oid + "'", "op_id asc").Tables[0];
            if (pdt != null && pdt.Rows.Count > 0)
            {
                rptEmployee1.DataSource = pdt.Select("op_type=2");
                rptEmployee1.DataBind();

                rptEmployee2.DataSource = pdt.Select("op_type=3");
                rptEmployee2.DataBind();

                rptEmployee3.DataSource = pdt.Select("op_type=4");
                rptEmployee3.DataBind();

                rptEmployee4.DataSource = pdt.Select("op_type=5");
                rptEmployee4.DataBind();

                liplace.Visible          = false;
                liemployee1.Visible      = false;
                liemployee2.Visible      = false;
                liemployee3.Visible      = false;
                liemployee4.Visible      = false;
                uploadDiv.Visible        = false;
                uploadDiv2.Visible       = false;
                btnSave.Visible          = false;
                btnDstatus.Visible       = false;
                btnFlag.Visible          = false;
                btnLockstatus.Visible    = false;
                btnUpdateCost.Visible    = false;
                btnUnBusinessPay.Visible = false;
                btnReceiptPay.Visible    = false;
                btnFinRemark.Visible     = false;
                //btnPay.Visible = false;
                btnInvoince.Visible = false;
                //btnExcelIn.Visible = false;
                btnSharing.Visible = false;
                trFile.Visible     = false;
                #region 根据当前登录账户显示不同按钮
                DataRow[] drs1       = pdt.Select("op_type=1 and op_number='" + manager.user_name + "'"); //业务员
                DataRow[] drs2       = pdt.Select("op_type=2 and op_number='" + manager.user_name + "'"); //业务报账人员
                DataRow[] drs3       = pdt.Select("op_type=3 and op_number='" + manager.user_name + "'"); //业务策划人员
                DataRow[] drs4       = pdt.Select("op_type=4 and op_number='" + manager.user_name + "'"); //业务执行人员
                DataRow[] drs6       = pdt.Select("op_type=5 and op_number='" + manager.user_name + "'"); //业务设计人员
                bool      showDetail = false;

                if (drs4.Length > 0)
                {
                    isExecutiver             = true;
                    showDetail               = true;
                    uploadDiv.Visible        = true;
                    btnUnBusinessPay.Visible = true;
                    btnReceiptPay.Visible    = true;
                    //btnPay.Visible = true;
                    btnInvoince.Visible = true;
                    //btnExcelIn.Visible = true;
                }
                if (drs3.Length > 0 || drs6.Length > 0)
                {
                    showDetail         = true;
                    uploadDiv.Visible  = true;
                    uploadDiv2.Visible = true;
                    btnDstatus.Visible = true;
                    trFile.Visible     = true;
                    if (drs3.Length > 0)
                    {
                        ddldstatus.SelectedValue = drs3[0]["op_dstatus"].ToString();
                    }
                    else if (drs6.Length > 0)
                    {
                        ddldstatus.SelectedValue = drs6[0]["op_dstatus"].ToString();
                    }
                }
                if (drs2.Length > 0)
                {
                    isExecutiver             = false;
                    showDetail               = true;
                    liplace.Visible          = true;
                    liemployee2.Visible      = true;
                    liemployee3.Visible      = true;
                    liemployee4.Visible      = true;
                    uploadDiv.Visible        = true;
                    uploadDiv2.Visible       = true;
                    btnUnBusinessPay.Visible = true;
                    btnReceiptPay.Visible    = true;
                    btnSave.Visible          = true;
                    //btnPay.Visible = true;
                    btnInvoince.Visible = true;
                    //btnExcelIn.Visible = true;
                    trFile.Visible = true;
                }
                if (drs1.Length > 0)
                {
                    isExecutiver             = false;
                    showDetail               = true;
                    liplace.Visible          = true;
                    liemployee1.Visible      = true;
                    liemployee2.Visible      = true;
                    liemployee3.Visible      = true;
                    liemployee4.Visible      = true;
                    uploadDiv.Visible        = true;
                    uploadDiv2.Visible       = true;
                    btnSave.Visible          = true;
                    btnUnBusinessPay.Visible = true;
                    btnReceiptPay.Visible    = true;
                    //btnPay.Visible = true;
                    btnInvoince.Visible = true;
                    //btnExcelIn.Visible = true;
                    trFile.Visible = true;
                }
                DataRow[] drs5 = pdt.Select("op_type=1");
                //判断是否含有查看本区域数据的权限
                if (new BLL.permission().checkHasPermission(manager, "0602") && (drs5[0]["op_area"].ToString() == manager.area || Utils.ObjectToStr(dr["o_place"]).IndexOf(manager.area) > -1))
                {
                    showDetail     = true;
                    trFile.Visible = true;
                }
                string groupArea = new BLL.department().getGroupArea();//总部

                //判断是否是本区域,且含有财务基本权限
                if ((drs5[0]["op_area"].ToString() == manager.area || groupArea == manager.area) && new BLL.permission().checkHasPermission(manager, "0401"))
                {
                    showDetail               = true;
                    trFile.Visible           = true;
                    btnUnBusinessPay.Visible = true;
                    btnReceiptPay.Visible    = true;
                    uploadDiv2.Visible       = true;
                    //btnPay.Visible = true;
                    btnInvoince.Visible = true;
                    //btnExcelIn.Visible = true;
                }
                //判断是否含有查看本区域审批权限
                if (drs5[0]["op_area"].ToString() == manager.area && new BLL.permission().checkHasPermission(manager, "0603"))
                {
                    trFile.Visible  = true;
                    showDetail      = true;
                    btnFlag.Visible = true;
                }
                //
                if (groupArea == manager.area)
                {
                    if (new BLL.permission().checkHasPermission(manager, "0401"))
                    {
                        showDetail     = true;
                        trFile.Visible = true;
                    }
                    if (new BLL.permission().checkHasPermission(manager, "0405"))
                    {
                        showDetail            = true;
                        btnLockstatus.Visible = true;
                        btnUpdateCost.Visible = true;
                        trFile.Visible        = true;
                    }
                }
                if (new BLL.permission().checkHasPermission(manager, "0401"))
                {
                    btnFinRemark.Visible = true;
                    if (!Utils.StrToBool(dr["o_lockStatus"].ToString(), false))
                    {
                        btnSharing.Visible = true;
                    }
                }
                //以上都没有权限的,不能查看订单详细
                if (!showDetail)
                {
                    string msgbox = "parent.jsdialog(\"错误提示\", \"您没有管理该页面的权限,请勿非法进入!\", \"back\")";
                    Response.Write("<script type=\"text/javascript\">" + msgbox + "</script>");
                    Response.End();
                }
                #endregion
            }
            #endregion

            if (dr["o_lockStatus"].ToString() == "1")
            {
                liplace.Visible          = false;
                liemployee1.Visible      = false;
                liemployee2.Visible      = false;
                liemployee3.Visible      = false;
                liemployee4.Visible      = false;
                uploadDiv.Visible        = false;
                uploadDiv2.Visible       = false;
                btnSave.Visible          = false;
                btnDstatus.Visible       = false;
                btnFlag.Visible          = false;
                btnUpdateCost.Visible    = false;
                btnUnBusinessPay.Visible = false;
                btnReceiptPay.Visible    = false;
                //btnPay.Visible = false;
                btnInvoince.Visible = true;
                //btnExcelIn.Visible = false;
            }

            #region 活动文件
            DataTable fdt = bll.GetFileList(0, "f_oid='" + _oid + "'", "f_addDate asc,f_id asc").Tables[0];
            if (fdt != null && fdt.Rows.Count > 0)
            {
                rptAlbumList.DataSource = fdt.Select("f_type=1");
                rptAlbumList.DataBind();

                rptAlbumList2.DataSource = fdt.Select("f_type=2");
                rptAlbumList2.DataBind();
            }
            #endregion

            string sqlwhere = "";
            #region 执行备用金借款明细
            if (isExecutiver)
            {
                sqlwhere = " and uba_PersonNum='" + manager.user_name + "'";
            }
            DataSet unBusinessData = new BLL.unBusinessApply().GetList(0, "uba_oid='" + _oid + "' " + sqlwhere + "", "uba_addDate desc,uba_id desc");
            if (unBusinessData != null && unBusinessData.Tables[0].Rows.Count > 0)
            {
                rptunBusinessList.DataSource = unBusinessData;
                rptunBusinessList.DataBind();
            }
            #endregion

            #region 应收付
            DataTable natureData = new BLL.finance().getNature(_oid, isExecutiver ? manager.user_name : "");
            if (natureData != null && natureData.Rows.Count > 0)
            {
                rptNature.DataSource = natureData;
                rptNature.DataBind();
            }

            #endregion

            #region 发票
            if (isExecutiver)
            {
                sqlwhere = " and inv_personNum='" + manager.user_name + "'";
            }
            DataTable invoiceData = new BLL.invoices().GetList(0, "inv_oid='" + _oid + "' " + sqlwhere + "", "inv_addDate desc,inv_id desc").Tables[0];
            if (invoiceData != null && invoiceData.Rows.Count > 0)
            {
                foreach (DataRow inv in invoiceData.Rows)
                {
                    if (inv["inv_flag1"].ToString() != "1" && inv["inv_flag2"].ToString() != "1" && inv["inv_flag3"].ToString() != "1")
                    {
                        requestMoney += Utils.StrToDecimal(inv["inv_money"].ToString(), 0);
                    }
                    if (Utils.StrToBool(inv["inv_isConfirm"].ToString(), false))
                    {
                        confirmMoney += Utils.StrToDecimal(inv["inv_money"].ToString(), 0);
                    }
                }
                rptInvoiceList.DataSource = invoiceData;
                rptInvoiceList.DataBind();
            }
            #endregion

            #region 已收付款
            if (isExecutiver)
            {
                sqlwhere = " and rpd_personNum='" + manager.user_name + "'";
            }
            DataTable rpData = new BLL.ReceiptPayDetail().GetList(0, "rpd_oid='" + _oid + "'", "rpd_type desc,rpd_adddate desc,rpd_id desc").Tables[0];
            if (rpData != null && rpData.Rows.Count > 0)
            {
                rptList.DataSource = rpData;
                rptList.DataBind();
            }
            #endregion

            #region 结算汇总
            if (!isExecutiver)//执行人员不可查看
            {
                DataTable collectData = bll.getOrderCollect(_oid);
                if (collectData != null && collectData.Rows.Count > 0)
                {
                    foreach (DataRow inv in collectData.Rows)
                    {
                        finProfit += Utils.StrToDecimal(inv["profit"].ToString(), 0);
                        if (inv["fin_type"].ToString() == "True")
                        {
                            fin1 += Utils.StrToDecimal(inv["finMoney"].ToString(), 0);
                        }
                        else
                        {
                            fin0 += Utils.StrToDecimal(inv["finMoney"].ToString(), 0);
                        }
                    }

                    rptCollect.DataSource = collectData;
                    rptCollect.DataBind();
                }
            }
            #endregion
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     this.pageSize = GetPageSize(10); //每页数量
     _page         = DTRequest.GetString("page");
     _sMonth       = DTRequest.GetString("txtsDate");
     _eMonth       = DTRequest.GetString("txteDate");
     _status       = DTRequest.GetString("ddlstatus");
     _lockstatus   = DTRequest.GetString("ddllock");
     _area         = DTRequest.GetString("hide_place");
     _person       = DTRequest.GetString("hide_employee3");
     _isRemove     = DTRequest.GetString("cbIsRemove");
     _isCust       = DTRequest.GetString("cbIsCust");
     action        = DTRequest.GetString("action");
     _type         = DTRequest.GetString("ddltype");
     _excel        = DTRequest.GetString("Excel");
     if (_type == "")
     {
         _type = "0";
     }
     _self = DTRequest.GetString("self");
     if (_self == "1")//个人业绩
     {
         manager             = GetAdminInfo();
         _person             = manager.real_name + "|" + manager.user_name + "|" + manager.area;
         liemployee3.Visible = false;
     }
     else
     {
         ChkAdminLevel("sys_AchievementStatistics", DTEnums.ActionEnum.View.ToString()); //检查权限
     }
     if (!IsPostBack && _excel != "on" && string.IsNullOrEmpty(_page))
     {
         _sMonth     = DateTime.Now.ToString("yyyy-MM");
         _eMonth     = DateTime.Now.ToString("yyyy-MM");
         _status     = "3";
         _lockstatus = "1";
         _isCust     = "on";
         RptBind("1=1 " + CombSqlTxt(), _type == "0"?"p1.op_number asc": "p3.op_number asc");
     }
     InitData();
     if (action == "Search")
     {
         RptBind("1=1 " + CombSqlTxt(), _type == "0" ? "p1.op_number asc" : "p3.op_number asc");
     }
     if (_excel == "on")
     {
         Excel();
     }
     #region 绑定控件值
     txtsDate.Text           = _sMonth;
     txteDate.Text           = _eMonth;
     ddlstatus.SelectedValue = _status;
     ddllock.SelectedValue   = _lockstatus;
     ddltype.SelectedValue   = _type;
     cbIsCust.Checked        = _isCust == "on" ? true : false;
     cbIsRemove.Checked      = _isRemove == "on" ? true : false;
     string placeStr = _area;
     if (!string.IsNullOrEmpty(placeStr))
     {
         Dictionary <string, string> areaDic      = new BLL.department().getAreaDict();
         Dictionary <string, string> orderAreaDic = new Dictionary <string, string>();
         string[] list = placeStr.Split(',');
         foreach (string item in list)
         {
             if (areaDic.ContainsKey(item))
             {
                 orderAreaDic.Add(item, areaDic[item]);
             }
         }
         rptAreaList.DataSource = orderAreaDic;
         rptAreaList.DataBind();
     }
     else
     {
         rptAreaList.DataSource = null;
         rptAreaList.DataBind();
     }
     if (!string.IsNullOrEmpty(_person))
     {
         DataTable dt = new DataTable();
         dt.Columns.Add("op_name");
         dt.Columns.Add("op_number");
         dt.Columns.Add("op_area");
         string[] list = _person.Split(',');
         foreach (string item in list)
         {
             DataRow  dr  = dt.NewRow();
             string[] lis = item.Split('|');
             dr["op_name"]   = lis[0];
             dr["op_number"] = lis[1];
             dr["op_area"]   = lis[2];
             dt.Rows.Add(dr);
         }
         rptEmployee2.DataSource = dt;
         rptEmployee2.DataBind();
     }
     else
     {
         rptEmployee2.DataSource = null;
         rptEmployee2.DataBind();
     }
     #endregion
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            this.pageSize = GetPageSize(10); //每页数量
            _page         = DTRequest.GetString("page");
            _sMonth       = DTRequest.GetString("txtsDate");
            _eMonth       = DTRequest.GetString("txteDate");
            _status       = DTRequest.GetString("ddlstatus");
            _lockstatus   = DTRequest.GetString("ddllock");
            _area         = DTRequest.GetString("hide_place");
            _isRemove     = DTRequest.GetString("cbIsRemove");
            _isCust       = DTRequest.GetString("cbIsCust");
            action        = DTRequest.GetString("action");
            _excel        = DTRequest.GetString("Excel");
            ChkAdminLevel("sys_AreaAchievementStatistics", DTEnums.ActionEnum.View.ToString()); //检查权限
            if (!IsPostBack && _excel != "on" && string.IsNullOrEmpty(_page))
            {
                _sMonth     = DateTime.Now.ToString("yyyy-MM");
                _eMonth     = DateTime.Now.ToString("yyyy-MM");
                _status     = "3";
                _lockstatus = "1";
                _isCust     = "on";
                RptBind("1=1 " + CombSqlTxt(), "de_area");
            }
            InitData();
            if (action == "Search")
            {
                RptBind("1=1 " + CombSqlTxt(), "de_area");
            }
            if (_excel == "on")
            {
                Excel();
            }

            #region 绑定控件值
            txtsDate.Text           = _sMonth;
            txteDate.Text           = _eMonth;
            ddlstatus.SelectedValue = _status;
            ddllock.SelectedValue   = _lockstatus;
            cbIsCust.Checked        = _isCust == "on" ? true : false;
            cbIsRemove.Checked      = _isRemove == "on" ? true : false;
            string placeStr = _area;
            if (!string.IsNullOrEmpty(placeStr))
            {
                Dictionary <string, string> areaDic      = new BLL.department().getAreaDict();
                Dictionary <string, string> orderAreaDic = new Dictionary <string, string>();
                string[] list = placeStr.Split(',');
                foreach (string item in list)
                {
                    if (areaDic.ContainsKey(item))
                    {
                        orderAreaDic.Add(item, areaDic[item]);
                    }
                }
                rptAreaList.DataSource = orderAreaDic;
                rptAreaList.DataBind();
            }
            else
            {
                rptAreaList.DataSource = null;
                rptAreaList.DataBind();
            }
            #endregion
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ChkAdminLevel("sys_RevenueAnalysis", DTEnums.ActionEnum.View.ToString()); //检查权限
            this.pageSize = GetPageSize(10);                                          //每页数量
            _page         = DTRequest.GetString("page");
            _sMonth       = DTRequest.GetString("txtsDate");
            _eMonth       = DTRequest.GetString("txteDate");
            _cusName      = DTRequest.GetString("txtCusName");
            _cid          = DTRequest.GetString("hCusId");
            _area         = DTRequest.GetString("hide_place");
            _nature       = DTRequest.GetString("hide_nature");
            _person1      = DTRequest.GetString("hide_employee1");
            _person3      = DTRequest.GetString("hide_employee3");
            _group        = DTRequest.GetString("ddlGroup");
            _excel        = DTRequest.GetString("Excel");
            action        = DTRequest.GetString("action");
            _lockstatus   = DTRequest.GetString("ddllock");
            InitData();
            if (!IsPostBack && _excel != "on" && string.IsNullOrEmpty(_page))
            {
                InitData();
                _lockstatus = "1";
                _sMonth     = DateTime.Now.ToString("yyyy-MM");
                _eMonth     = DateTime.Now.ToString("yyyy-MM");
                RptBind();
            }
            if (action == "Search")
            {
                RptBind();
            }
            if (_excel == "on")
            {
                Excel();
            }

            #region 绑定控件值
            txtsDate.Text          = _sMonth;
            txteDate.Text          = _eMonth;
            txtCusName.Text        = _cusName;
            hCusId.Value           = _cid;
            ddlGroup.SelectedValue = _group;
            ddllock.SelectedValue  = _lockstatus;
            string placeStr = _area;
            if (!string.IsNullOrEmpty(placeStr))
            {
                Dictionary <string, string> areaDic      = new BLL.department().getAreaDict();
                Dictionary <string, string> orderAreaDic = new Dictionary <string, string>();
                string[] list = placeStr.Split(',');
                foreach (string item in list)
                {
                    if (areaDic.ContainsKey(item))
                    {
                        orderAreaDic.Add(item, areaDic[item]);
                    }
                }
                rptAreaList.DataSource = orderAreaDic;
                rptAreaList.DataBind();
            }
            else
            {
                rptAreaList.DataSource = null;
                rptAreaList.DataBind();
            }
            if (!string.IsNullOrEmpty(_nature))
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("na_id");
                dt.Columns.Add("na_name");
                string[] list = _nature.Split(',');
                foreach (string item in list)
                {
                    DataRow  dr  = dt.NewRow();
                    string[] lis = item.Split('|');
                    dr["na_id"]   = lis[0];
                    dr["na_name"] = lis[1];
                    dt.Rows.Add(dr);
                }
                rptNatureList.DataSource = dt;
                rptNatureList.DataBind();
            }
            else
            {
                rptNatureList.DataSource = null;
                rptNatureList.DataBind();
            }
            if (!string.IsNullOrEmpty(_person1))
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("op_name");
                dt.Columns.Add("op_number");
                dt.Columns.Add("op_area");
                string[] list = _person1.Split(',');
                foreach (string item in list)
                {
                    DataRow  dr  = dt.NewRow();
                    string[] lis = item.Split('|');
                    dr["op_name"]   = lis[0];
                    dr["op_number"] = lis[1];
                    dr["op_area"]   = lis[2];
                    dt.Rows.Add(dr);
                }
                rptEmployee1.DataSource = dt;
                rptEmployee1.DataBind();
            }
            else
            {
                rptEmployee1.DataSource = null;
                rptEmployee1.DataBind();
            }
            if (!string.IsNullOrEmpty(_person3))
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("op_name");
                dt.Columns.Add("op_number");
                dt.Columns.Add("op_area");
                string[] list = _person3.Split(',');
                foreach (string item in list)
                {
                    DataRow  dr  = dt.NewRow();
                    string[] lis = item.Split('|');
                    dr["op_name"]   = lis[0];
                    dr["op_number"] = lis[1];
                    dr["op_area"]   = lis[2];
                    dt.Rows.Add(dr);
                }
                rptEmployee3.DataSource = dt;
                rptEmployee3.DataBind();
            }
            else
            {
                rptEmployee3.DataSource = null;
                rptEmployee3.DataBind();
            }
            #endregion
        }