예제 #1
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            string goodId = Utils.GetQueryStringValue("goodId");

            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            EyouSoft.BLL.GovStructure.BGood BLL = new EyouSoft.BLL.GovStructure.BGood();
            IList <MGovGoodUseList>         lst = BLL.GetGovUseGoodList(this.SiteUserInfo.CompanyId, goodId, 0, pageSize, pageIndex, ref recordCount);

            if (lst != null && lst.Count > 0)
            {
                this.rpt_List.DataSource = lst;
                this.rpt_List.DataBind();
                if (recordCount <= pageSize)
                {
                    this.ExporPageInfoSelect1.Visible = false;
                }
                else
                {
                    BindPage();
                }
            }
            else
            {
                this.rpt_List.Controls.Add(new Label()
                {
                    Text = "<tr><td colspan='20' height='28' align='center'>对不起,没有相关数据!</td></tr>"
                });
                this.ExporPageInfoSelect1.Visible = false;
            }
        }
예제 #2
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            //string txtName = Utils.GetQueryStringValue("txtName");//物品名称;
            //string txtInSTime = Utils.GetQueryStringValue("txtInSTime");//入库开始时间
            //string txtInETime = Utils.GetQueryStringValue("txtInETime");//入库结束时间
            //获取分页参数并强转'
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);

            EyouSoft.BLL.GovStructure.BGood BLL = new EyouSoft.BLL.GovStructure.BGood();
            IList <EyouSoft.Model.GovStructure.MGovGoodList> lst = BLL.GetGovGoodList(this.SiteUserInfo.CompanyId, "", null, null, pageSize, pageIndex, ref this.recordCount);

            if (null != lst && lst.Count > 0)
            {
                this.RepList.DataSource = lst;
                this.RepList.DataBind();
                listCount = lst.Count;
                BindPage();
            }
            else
            {
                this.RepList.Controls.Add(new Label()
                {
                    Text = "<tr><td align='center'>对不起,没有相关数据!</td></tr>"
                });
                this.ExporPageInfoSelect1.Visible = false;
            }
        }
예제 #3
0
        /// <summary>
        /// 删除操作
        /// </summary>
        /// <param name="id">删除ID</param>
        /// <returns></returns>
        private void DeleteData()
        {
            string id  = Utils.GetQueryStringValue("id");
            string msg = String.Empty;
            int    b   = 0;

            if (!String.IsNullOrEmpty(id))
            {
                EyouSoft.BLL.GovStructure.BGood BLL = new EyouSoft.BLL.GovStructure.BGood();
                b = BLL.DeleteGovGood(id.Split(','));
            }
            switch (b)
            {
            case 1:
                msg = "删除成功!";    //成功
                break;

            case 2:
                msg = "删除失败,该物品已被使用!";
                break;

            default:
                msg = "删除失败!";
                break;
            }
            Response.Clear();
            Response.Write(UtilsCommons.AjaxReturnJson(b.ToString(), msg));
            Response.End();
        }
예제 #4
0
        /// <summary>
        /// 物品借阅归还
        /// </summary>
        private void LendBack()
        {
            string ids = Utils.GetQueryStringValue("ids");

            EyouSoft.BLL.GovStructure.BGood BLL = new EyouSoft.BLL.GovStructure.BGood();
            int    flag = BLL.ReturnGovGoodBorrow(ids.Split(','));
            string msg  = flag > 0 ? "借阅归还成功!" : "借阅归还失败!";

            Response.Clear();
            Response.Write(UtilsCommons.AjaxReturnJson(flag.ToString(), msg));
            Response.End();
        }
예제 #5
0
        /// <summary>
        /// 删除领用信息
        /// </summary>
        void Delete()
        {
            string s = Utils.GetQueryStringValue("lingyongid");

            if (string.IsNullOrEmpty(s))
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "异常请求"));
            }

            var bllRetCode = new EyouSoft.BLL.GovStructure.BGood().DeleteLingYong(s, SiteUserInfo.CompanyId);

            if (bllRetCode == 1)
            {
                RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            else
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败"));
            }
        }