Пример #1
0
        private void InitDataTree(int loginId)
        {
            List <string> treenodes = new List <string>();

            IList <DepartmentInfo> departmentList = DepartmentInfoManager.getDepartmentInfoAll();

            //IList<DepartmentInfo> departmentList = DepartmentInfoManager.getDepartmentInfoAllById(loginId);


            foreach (DepartmentInfo deparment in departmentList)
            {
                string node = string.Format("{{ 'id':'{0}', 'pId':'{1}', 'name':'{2}', 'open':'true','halfCheck':'false','isParent':'true','icon':'../../images/public/folder_user.gif'}}",
                                            "dp" + deparment.Departid, 0, deparment.Departcname);
                treenodes.Add(node);
            }

            IList <LoginInfo> loginList = LoginInfoManager.getLoginInfoAll();

            string ids = "," + LoginDataLimitManager.GetLimit(loginId) + ",";

            foreach (LoginInfo login in loginList)
            {
                string node = string.Format("{{ 'id':'{0}', 'pId':'{1}', 'name':'{2}', 'checked':'{3}','icon':'../../images/public/group.gif'}}",
                                            login.Id, "dp" + login.Departid, login.Cname, ids.IndexOf("," + login.Id.ToString() + ",") < 0 ? false : true);
                treenodes.Add(node);
            }

            NodesData = string.Join(",", treenodes.ToArray());
        }
Пример #2
0
        private void bindDatasource()
        {
            string sqlstr = "";

            sqlstr += Session["query"].ToString();
            LoginInfo login = (LoginInfo)Session["login"];
            string    ids   = LoginDataLimitManager.GetLimit(login.Id);

            if (string.IsNullOrEmpty(ids))
            {
                sqlstr += " and invoiceCMan = " + login.Id;
            }
            else
            {
                sqlstr += " and invoiceCMan in (" + ids + "," + login.Id + ")";
            }
            SearchPageSet sps = SearchPageSetManager.getSearchPageSetByLoginId(login.Id, 016);

            if (sps == null)
            {
                Data    data = new Data();
                DataSet ds   = data.DataPage("to_Invoice", "Id", "*", sqlstr, "Id", true, 5, 5, pages);
                rpInvoice.DataSource = ds;
                rpInvoice.DataBind();
            }
            else
            {
                Data    data = new Data();
                DataSet ds   = data.DataPage("to_Invoice", "Id", "*", sqlstr, "Id", true, sps.Pageitem, sps.Pagecount, pages);
                rpInvoice.DataSource = ds;
                rpInvoice.DataBind();
            }
        }
Пример #3
0
        /// <summary>
        /// 绑定付费列表数据
        /// </summary>
        private void BindPaymentList()
        {
            LoginInfo login  = (LoginInfo)Session["login"];
            string    sqlstr = "";

            sqlstr += FilterSql;
            string ids = LoginDataLimitManager.GetLimit(login.Id);

            if (string.IsNullOrEmpty(ids))
            {
                sqlstr += " and makerID = " + login.Id;
            }
            else
            {
                sqlstr += " and makerID in (" + ids + ")";
            }
            SearchPageSet sps  = SearchPageSetManager.getSearchPageSetByLoginId(login.Id, 017);
            Data          data = new Data();

            if (sps == null)
            {
                DataSet ds = data.DataPage("View_PaymentList", "id", "*", sqlstr, "requestDate", true, 10, 5, pages);
                RpPaymentList.DataSource = ds;
                RpPaymentList.DataBind();
            }
            else
            {
                DataSet ds = data.DataPage("View_PaymentList", "id", "*", sqlstr, "requestDate", true, sps.Pageitem, sps.Pagecount, pages);
                RpPaymentList.DataSource = ds;
                RpPaymentList.DataBind();
            }
        }
Пример #4
0
        protected void mgbtnreset_Click(object sender, ImageClickEventArgs e)
        {
            string sqlstr = "";

            Session["query"] = null;
            LoginInfo login = (LoginInfo)Session["login"];
            string    ids   = LoginDataLimitManager.GetLimit(login.Id);

            if (string.IsNullOrEmpty(ids))
            {
                sqlstr += " and madefrom = " + login.Id;
            }
            else
            {
                sqlstr += " and madefrom in (" + ids + "," + login.Id + ")";
            }
            SearchPageSet sps = SearchPageSetManager.getSearchPageSetByLoginId(login.Id, 010);

            if (sps == null)
            {
                Data    data = new Data();
                DataSet ds   = data.DataPage("Company", "Id", "*", sqlstr, "Id", true, 5, 5, pages);
                comList.DataSource = ds;
                comList.DataBind();
            }
            else
            {
                Data    data = new Data();
                DataSet ds   = data.DataPage("Company", "Id", "*", sqlstr, "Id", true, sps.Pageitem, sps.Pagecount, pages);
                comList.DataSource = ds;
                comList.DataBind();
            }
        }
Пример #5
0
        /// <summary>
        ///  订单列表
        /// </summary>
        private void OrderListBind()
        {
            string sqlstr = this.checkfile.Checked ? " " : " and fileStatus=0 ";

            sqlstr += Session["query"].ToString();
            LoginInfo login = (LoginInfo)Session["login"];
            string    ids   = LoginDataLimitManager.GetLimit(login.Id);

            if (string.IsNullOrEmpty(ids))
            {
                sqlstr += " and (markid = " + login.Id + " or inputerId= " + login.Id + ") ";
            }
            else
            {
                sqlstr += " and (inputerId in (" + ids + ") or markid= " + login.Id + ") ";//0419修改,将查看数据权限更改为可查看操作员数据
            }
            //sqlstr += " or inputerID = " + login.Id; //操作员也能看到其对应的订单信息

            SearchPageSet sps  = SearchPageSetManager.getSearchPageSetByLoginId(login.Id, 013);
            Data          data = new Data();

            AspNetPager1.RecordCount = data.GetCount("ViewOrder", sqlstr);
            if (sps == null)
            {
                AspNetPager1.NumericButtonCount = 10;
                AspNetPager1.PageSize           = 10;
            }
            else
            {
                AspNetPager1.NumericButtonCount = sps.Pagecount;
                AspNetPager1.PageSize           = sps.Pageitem;
            }
            DataTable dt = data.GetList("ViewOrder", "makerTime", "desc", AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, sqlstr);

            cuslist.DataSource = dt;
            cuslist.DataBind();
            LoadZtreeData();
        }
Пример #6
0
        /// <summary>
        /// 绑定业务员信息
        /// </summary>
        private void LoadSalesman()
        {
            this.ddlsalesman.Items.Clear();
            this.ddlsalesman.Items.Add(new ListItem("——请选择——", "0"));
            LoginInfo current = (LoginInfo)Session["login"];
            string    ids     = LoginDataLimitManager.GetLimit(current.Id);

            if (string.IsNullOrEmpty(ids))
            {
                this.ddlsalesman.Items.Add(new ListItem(current.Cname, current.Id.ToString()));
            }
            else
            {
                DataTable dt = LoginInfoManager.getList(" id in (" + ids + ")");
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    ListItem adItem = new ListItem();
                    adItem.Value = dt.Rows[i]["id"].ToString();
                    adItem.Text  = dt.Rows[i]["cname"].ToString();
                    this.ddlsalesman.Items.Add(adItem);
                }
            }
        }
Пример #7
0
        /// <summary>
        /// 查询显示所有报销明细数据
        /// </summary>
        private void LoadAllAusDetial()
        {
            this.pages.Visible = true;
            double    zje     = 0;
            DataTable tbl     = Exists();
            string    str     = "";
            int       login   = ((LoginInfo)Session["login"]).Id;
            string    strlist = LoginDataLimitManager.GetLimit(login);

            if (strlist == null || strlist.Trim() == "")
            {
                str = " AND founderid in (" + login + ")";
            }
            else
            {
                str = " AND founderid in (" + login + "," + strlist + ")";
            }

            str += Session["query"];
            int pitem  = int.Parse(tbl.Rows[0]["pageitem"].ToString());
            int pcount = int.Parse(tbl.Rows[0]["pagecount"].ToString());

            EtNet_BLL.DataPage.Data data = new EtNet_BLL.DataPage.Data();
            DataSet set = data.DataPage("View_AllAusDetial", "bxdh", "*", str, "applydate", true, pitem, pcount, pages);

            for (int i = 0; i < set.Tables[0].Rows.Count; i++)
            {
                zje += set.Tables[0].Rows[i]["ausmoney"].ToString() == "" ? 0.00 : Convert.ToDouble(set.Tables[0].Rows[i]["ausmoney"]);
            }


            this.rptdata.DataSource = set;
            this.rptdata.DataBind();

            this.zje.Text = zje.ToString("0.00");
        }
Пример #8
0
        protected void mgbtnreset_Click1(object sender, ImageClickEventArgs e)
        {
            string sqlstr = "";

            sqlstr += Session["query"].ToString();
            LoginInfo login = (LoginInfo)Session["login"];
            string    ids   = LoginDataLimitManager.GetLimit(login.Id);

            if (string.IsNullOrEmpty(ids))
            {
                sqlstr += " and invoiceCMan = " + login.Id;
            }
            else
            {
                sqlstr += " and invoiceCMan in (" + ids + "," + login.Id + ")";
            }
            SearchPageSet sps = SearchPageSetManager.getSearchPageSetByLoginId(login.Id, 016);

            if (sps == null)
            {
                Data    data = new Data();
                DataSet ds   = data.DataPage("to_Invoice", "Id", "*", sqlstr, "Id", true, 5, 5, pages);
                rpInvoice.DataSource = ds;
                rpInvoice.DataBind();
            }
            else
            {
                Data    data = new Data();
                DataSet ds   = data.DataPage("to_Invoice", "Id", "*", sqlstr, "Id", true, sps.Pageitem, sps.Pagecount, pages);
                rpInvoice.DataSource = ds;
                rpInvoice.DataBind();
            }


            this.txtBeginDate.Value = ""; this.txtEndDate.Value = ""; this.txtInvoiceID.Value = ""; this.txtPrice.Value = ""; this.txtUnit.Value = "";
        }