Esempio n. 1
0
    public void BindGv()
    {
        string selectedValue = this.ddlScope.SelectedValue;
        bool   isGetAll      = true;

        if (this.ViewState["search"].ToString() == "0")
        {
            selectedValue = this.tvFile.SelectedValue;
            isGetAll      = false;
        }
        int count = this.fileInfoBll.GetListArray(string.Concat(new string[]
        {
            " where id='",
            selectedValue,
            "'and ( userCodes like '%",
            base.UserCode,
            "%' or userCodes='00000000' )and IsValid='false'  order by CreateTime desc"
        })).Count;

        if (count > 0)
        {
            this.btn_Search.Enabled = true;
            this.lblMsgAleave.Text  = "";
            int allFilesCount = FileInfoBll.GetAllFilesCount(selectedValue, base.UserCode, this.txtStartTime.Text, this.txtEndTime.Text, this.txtFileName.Text.Trim(), WebUtil.GetBSize(this.txtStartSize.Text), WebUtil.GetBSize(this.txtEndSize.Text), this.txtFileOwner.Text.Trim(), isGetAll);
            this.AspNetPager1.RecordCount = allFilesCount;
            DataTable allFiles = FileInfoBll.GetAllFiles(selectedValue, base.UserCode, this.txtStartTime.Text, this.txtEndTime.Text, this.txtFileName.Text.Trim(), WebUtil.GetBSize(this.txtStartSize.Text), WebUtil.GetBSize(this.txtEndSize.Text), this.txtFileOwner.Text.Trim(), isGetAll, this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex);
            Common2.BindGvTable(allFiles, this.gvFile, true);
            return;
        }
        this.gvFile.DataBind();
        this.btn_Search.Enabled = false;
        this.lblMsgAleave.Text  = "<div style='color:Red; margin-left:20px; margin-top:20px; '>您没有该目录的权限,请与系统管理员联系。</div>";
    }
Esempio n. 2
0
    public void BindGv()
    {
        string selectedValue = this.tvFile.SelectedValue;
        int    flodersCount  = FileInfoBll.GetFlodersCount(selectedValue);

        this.AspNetPager1.RecordCount = flodersCount;
        DataTable folders = FileInfoBll.GetFolders(selectedValue, this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex);

        Common2.BindGvTable(folders, this.gvFile, true);
    }
Esempio n. 3
0
    protected void Bind_GVAllocationList()
    {
        AllocationBllAction allocationBllAction = new AllocationBllAction();
        DataTable           allocationList      = allocationBllAction.GetAllocationList(" 1 = 1 order by intime desc");

        if (allocationList != null && allocationList.Rows.Count > NBasePage.pagesize)
        {
            this.HdnIsPage.Value = "1";
        }
        Common2.BindGvTable(allocationList, this.GVAllocationList, false);
    }
Esempio n. 4
0
    protected void DataBindGVMaterial()
    {
        ResourceSelectBllAction resourceSelectBllAction = new ResourceSelectBllAction();
        DataTable materialList = resourceSelectBllAction.GetMaterialList(this.getStrWhere());

        if (materialList != null && materialList.Rows.Count > NBasePage.pagesize)
        {
            this.HdnIsPage.Value = "1";
        }
        Common2.BindGvTable(materialList, this.GVMaterial, false);
    }
Esempio n. 5
0
    public void BindGv()
    {
        string selectedValue = this.ddlScope.SelectedValue;
        bool   isGetAll      = true;
        bool   isShare       = false;

        if (this.ViewState["search"].ToString() == "0")
        {
            selectedValue = this.tvFile.SelectedValue;
            isGetAll      = false;
        }
        this.btnAdd.Disabled     = false;
        this.FileUpload2.Visible = true;
        int       recordCount;
        DataTable storageDataSource;

        if (selectedValue == "0")
        {
            this.btnAdd.Disabled     = true;
            this.FileUpload2.Visible = false;
            string shareFolderIds = (this.ViewState["shareId"] == null) ? string.Empty : this.ViewState["shareId"].ToString();
            recordCount       = PersonalFileBll.GetShareFolersCount(shareFolderIds);
            storageDataSource = PersonalFileBll.GetShareFolders(shareFolderIds, this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex);
        }
        else
        {
            PersonalFileModel model = this.personalFileBll.GetModel(selectedValue);
            if (model != null)
            {
                if (model.FileOwner != base.UserCode)
                {
                    this.btnAdd.Disabled     = true;
                    this.FileUpload2.Visible = false;
                    isShare = true;
                }
                if (this.tvFile.Nodes[0].Value == model.Id)
                {
                    this.FileUpload2.Visible = false;
                }
            }
            recordCount       = PersonalFileBll.GetAllFilesCount(selectedValue, this.txtStartTime.Text, this.txtEndTime.Text, this.txtFileName.Text, WebUtil.GetBSize(this.txtStartSize.Text), WebUtil.GetBSize(this.txtEndSize.Text), base.UserCode, isGetAll, isShare);
            storageDataSource = PersonalFileBll.GetAllFiles(selectedValue, this.txtStartTime.Text, this.txtEndTime.Text, this.txtFileName.Text, WebUtil.GetBSize(this.txtStartSize.Text), WebUtil.GetBSize(this.txtEndSize.Text), base.UserCode, isGetAll, isShare, this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex);
        }
        this.AspNetPager1.RecordCount = recordCount;
        Common2.BindGvTable(storageDataSource, this.gvFile, true);
    }
    protected void Bind()
    {
        AllocationBllAction allocationBllAction      = new AllocationBllAction();
        DataTable           materialOfDepositoryList = allocationBllAction.GetMaterialOfDepositoryList((base.Request.QueryString["did"] == "") ? "0" : base.Request.QueryString["did"], this.getStrWhere());

        if (materialOfDepositoryList != null && materialOfDepositoryList.Rows.Count > NBasePage.pagesize)
        {
            this.HdnIsPage.Value = "1";
        }
        Common2.BindGvTable(materialOfDepositoryList, this.GVMaterialList, false);
        List <string> list = new List <string>();

        if (this.hdTsid.Value != "")
        {
            list = JsonHelper.GetListFromJson(this.hdTsid.Value);
        }
        foreach (GridViewRow gridViewRow in this.GVMaterialList.Rows)
        {
            CheckBox checkBox = gridViewRow.FindControl("chkSelectIt") as CheckBox;
            if (checkBox != null)
            {
                HiddenField hiddenField  = gridViewRow.FindControl("hdScode") as HiddenField;
                HiddenField hiddenField2 = gridViewRow.FindControl("hdSprice") as HiddenField;
                HiddenField hiddenField3 = gridViewRow.FindControl("hdCorp") as HiddenField;
                string      item         = string.Concat(new string[]
                {
                    hiddenField.Value,
                    "|",
                    hiddenField2.Value,
                    "|",
                    hiddenField3.Value,
                    "|"
                });
                if (list.Contains(item))
                {
                    checkBox.Checked = true;
                }
            }
        }
    }
Esempio n. 7
0
    protected void ShowAllocationData()
    {
        AllocationBllAction allocationBllAction = new AllocationBllAction();
        AllocationModel     allocationModel     = new AllocationModel();

        allocationModel                  = allocationBllAction.ReturnAllocatonModel("acode='" + ((base.Request.QueryString["ac"] == "") ? "0" : base.Request.QueryString["ac"]) + "' ");
        this.lblAllocationNo.Text        = allocationModel.Acode;
        this.txtOutDepository.Text       = allocationBllAction.GetTreasuryNameByCode(allocationModel.TCodea).Rows[0][0].ToString();
        this.HdnSelectOutDepo.Value      = allocationModel.TCodea;
        this.txtInDepository.Text        = allocationBllAction.GetTreasuryNameByCode(allocationModel.TCodeb).Rows[0][0].ToString();
        this.HdnIsTotal.Value            = allocationBllAction.GetTreasuryNameByCode(allocationModel.TCodea).Rows[0][1].ToString();
        this.HdnSecTotal.Value           = allocationBllAction.GetTreasuryNameByCode(allocationModel.TCodea).Rows[0][1].ToString();
        this.HdnSelectInDepo.Value       = allocationModel.TCodeb;
        this.txtInDate.Text              = allocationModel.InTime;
        this.txtOutAllocationPerson.Text = allocationBllAction.GetUserNameByCode(allocationModel.OutAllocationPerson);
        this.HdnSelectOutPer.Value       = allocationModel.OutAllocationPerson;
        this.txtInAllocationPerson.Text  = allocationBllAction.GetUserNameByCode(allocationModel.InAllocationPerson);
        this.HdnSelectInPer.Value        = allocationModel.InAllocationPerson;
        this.txtRemark.Text              = allocationModel.Explain;
        this.hdGuid.Value                = allocationModel.Aid;
        DataTable allocationStockList = allocationBllAction.GetAllocationStockList(allocationModel.TCodea, "acode='" + allocationModel.Acode + "'");

        if (allocationStockList != null && allocationStockList.Rows.Count > NBasePage.pagesize)
        {
            this.HdnIsPage.Value = "1";
        }
        this.ViewState["DataTable"] = allocationStockList;
        if (allocationStockList.Rows.Count > 0)
        {
            Common2.BindGvTable(allocationStockList, this.GVMaterialList, false);
            string total = Convert.ToDecimal(allocationStockList.Compute("SUM(Total)", string.Empty)).ToString("0.000");
            GridViewUtility.AddTotalRow(this.GVMaterialList, total, 12);
            return;
        }
        this.GVMaterialList.DataSource = allocationStockList;
        this.GVMaterialList.DataBind();
    }
Esempio n. 8
0
 public void BindGv()
 {
     Common2.BindGvTable(Common2.GetTable("F_FileInfo", " where ParentId='" + this.tvFile.SelectedValue + "' and ParentId!=Id  and FileType=2 and IsValid='True'  order by CreateTime desc"), this.gvFile, true);
 }
Esempio n. 9
0
 protected void Bind_gvwStorage(string strWhere)
 {
     Common2.BindGvTable(this.ReportAlocationDataSource(strWhere), this.gvwStorage, false);
 }