Ejemplo n.º 1
0
 protected void GVAllocationList1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         try
         {
             AllocationBllAction allocationBllAction = new AllocationBllAction();
             DataRowView         dataRowView         = (DataRowView)e.Row.DataItem;
             e.Row.Cells[1].Text = (this.GVAllocationList.PageSize * this.GVAllocationList.PageIndex + e.Row.RowIndex + 1).ToString();
             HyperLink hyperLink = (HyperLink)e.Row.Cells[2].FindControl("HyperLink1");
             hyperLink.Text = string.Concat(new string[]
             {
                 "<a class='al' href=javascript:viewopen('AuditPage.aspx?ic=",
                 dataRowView["aid"].ToString(),
                 "&BusiClass=001&BusiCode=075',820,500) >",
                 dataRowView["acode"].ToString(),
                 "</a>"
             });
             e.Row.Cells[3].Text              = allocationBllAction.GetTreasuryNameByCode(dataRowView["tcodea"].ToString()).Rows[0][0].ToString();
             e.Row.Cells[4].Text              = allocationBllAction.GetTreasuryNameByCode(dataRowView["tcodeb"].ToString()).Rows[0][0].ToString();
             e.Row.Attributes["id"]           = dataRowView["acode"].ToString();
             e.Row.Attributes["guid"]         = dataRowView["aid"].ToString();
             e.Row.Attributes["auditContent"] = "调拨单管理:" + this.GVAllocationList.DataKeys[e.Row.RowIndex].Value.ToString();
         }
         catch
         {
         }
     }
 }
Ejemplo n.º 2
0
    protected void ShowAllocationData()
    {
        AllocationBllAction allocationBllAction = new AllocationBllAction();
        AllocationModel     allocationModel     = new AllocationModel();

        allocationModel                  = allocationBllAction.ReturnAllocatonModel("aid='" + base.Request.QueryString["ic"] + "' ");
        this.lblAllocationNo.Text        = allocationModel.Acode;
        this.FileLink1.FID               = allocationModel.Acode;
        this.txtOutDepository.Text       = allocationBllAction.GetTreasuryNameByCode(allocationModel.TCodea).Rows[0][0].ToString();
        this.txtInDepository.Text        = allocationBllAction.GetTreasuryNameByCode(allocationModel.TCodeb).Rows[0][0].ToString();
        this.txtInDate.Text              = allocationModel.InTime;
        this.txtOutAllocationPerson.Text = allocationBllAction.GetUserNameByCode(allocationModel.OutAllocationPerson);
        this.txtInAllocationPerson.Text  = allocationBllAction.GetUserNameByCode(allocationModel.InAllocationPerson);
        this.txtRemark.Text              = allocationModel.Explain;
        this.HdnTCodea.Value             = allocationModel.TCodea;
        this.HdnAcode.Value              = allocationModel.Acode;
        DataTable allocationStockList = allocationBllAction.GetAllocationStockList(allocationModel.TCodea, "acode='" + allocationModel.Acode + "'");

        this.GVMaterialList.DataSource = allocationStockList;
        this.GVMaterialList.DataBind();
        if (allocationStockList.Rows.Count > 0)
        {
            string total = Convert.ToDecimal(allocationStockList.Compute("SUM(Total)", string.Empty)).ToString("0.000");
            GridViewUtility.AddTotalRow(this.GVMaterialList, total, 11);
        }
        this.lblBllProducer.Text = PageHelper.QueryUser(this, base.UserCode);
        this.lblPrintDate.Text   = DateTime.Now.ToShortDateString();
    }
Ejemplo n.º 3
0
 protected void gvwStorage_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         try
         {
             AllocationBllAction allocationBllAction = new AllocationBllAction();
             DataRowView         dataRowView         = (DataRowView)e.Row.DataItem;
             e.Row.Cells[15].Text = allocationBllAction.GetTreasuryNameByCode(dataRowView["tcodea"].ToString()).Rows[0][0].ToString();
             e.Row.Cells[16].Text = allocationBllAction.GetTreasuryNameByCode(dataRowView["tcodeb"].ToString()).Rows[0][0].ToString();
         }
         catch
         {
         }
     }
 }
Ejemplo n.º 4
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();
    }
Ejemplo n.º 5
0
 protected void GVAllocationList_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         try
         {
             AllocationBllAction allocationBllAction = new AllocationBllAction();
             DataRowView         dataRowView         = (DataRowView)e.Row.DataItem;
             e.Row.Cells[1].Text = (this.GVAllocationList.PageSize * this.GVAllocationList.PageIndex + e.Row.RowIndex + 1).ToString();
             HyperLink hyperLink = (HyperLink)e.Row.Cells[2].FindControl("HyperLink1");
             hyperLink.Text = string.Concat(new string[]
             {
                 "<a class='al' href=javascript:viewopen('AuditPage.aspx?ic=",
                 dataRowView["aid"].ToString(),
                 "&BusiClass=001&BusiCode=075',820,500) >",
                 dataRowView["acode"].ToString(),
                 "</a>"
             });
             if (e.Row.Cells[8].Text == "已审核")
             {
                 e.Row.Cells[8].ForeColor = Color.Green;
             }
             else
             {
                 e.Row.Cells[6].ForeColor = Color.Red;
             }
             e.Row.Cells[3].Text = allocationBllAction.GetTreasuryNameByCode(dataRowView["tcodea"].ToString()).Rows[0][0].ToString();
             e.Row.Cells[4].Text = allocationBllAction.GetTreasuryNameByCode(dataRowView["tcodeb"].ToString()).Rows[0][0].ToString();
             ((CheckBox)e.Row.Cells[0].FindControl("chkSelectIt")).Attributes["onclick"] = string.Concat(new object[]
             {
                 "chkClick('",
                 Convert.ToBoolean(dataRowView["isinb"]),
                 "',this.checked,'",
                 dataRowView["acode"].ToString(),
                 "');"
             });
             e.Row.Attributes["onclick"] = string.Concat(new object[]
             {
                 "rowClick('",
                 Convert.ToBoolean(dataRowView["isinb"]),
                 "','",
                 dataRowView["acode"].ToString(),
                 "');"
             });
             e.Row.Attributes["id"] = dataRowView["acode"].ToString();
             if (Convert.ToBoolean(dataRowView["isouta"]))
             {
                 e.Row.Cells[6].Text      = "已调出";
                 e.Row.Cells[6].ForeColor = Color.Green;
             }
             else
             {
                 e.Row.Cells[6].Text      = "未调出";
                 e.Row.Cells[6].ForeColor = Color.Red;
             }
             if (Convert.ToBoolean(dataRowView["isinb"]))
             {
                 e.Row.Cells[7].Text      = "已接收";
                 e.Row.Cells[7].ForeColor = Color.Green;
             }
             else
             {
                 e.Row.Cells[7].Text      = "未接收";
                 e.Row.Cells[7].ForeColor = Color.Red;
             }
         }
         catch
         {
         }
     }
 }