Ejemplo n.º 1
0
    private void CostInputDatabind(string RecordID)
    {
        string strWhere = string.Format("RecordID = '{0}'", RecordID);

        this.dgCostInputSlave.DataSource = CostInputSlaveAction.GetPageData(strWhere);
        this.dgCostInputSlave.DataBind();
    }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         if (base.Request.QueryString["ic"] != null)
         {
             this.RecordID = new Guid(base.Request.QueryString["ic"]);
         }
         DataTable singleCostInputPriTable = CostInputPriAction.getSingleCostInputPriTable(this.RecordID);
         this.lblItemName.Text = singleCostInputPriTable.Rows[0]["CostItemName"].ToString();
         this.lblDate.Text     = Convert.ToDateTime(singleCostInputPriTable.Rows[0]["HappenDate"].ToString()).ToShortDateString();
         this.lblDept.Text     = singleCostInputPriTable.Rows[0]["HappenUnit"].ToString();
         this.lblUser.Text     = singleCostInputPriTable.Rows[0]["FillPeople"].ToString();
         this.HdnPerson.Value  = singleCostInputPriTable.Rows[0]["TouchMan"].ToString();
         this.lblPerson.Text   = PageHelper.QueryUser(this, singleCostInputPriTable.Rows[0]["TouchMan"].ToString());
         DataTable costInputSlaveTable = CostInputSlaveAction.getCostInputSlaveTable(this.RecordID);
         this.ViewState["CostSlave"]      = costInputSlaveTable;
         this.dgCostInputSlave.DataSource = (DataTable)this.ViewState["CostSlave"];
         this.dgCostInputSlave.DataBind();
     }
 }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         if (base.Request.QueryString["RecordID"] == null || base.Request.QueryString["RecordID"].ToString() == "")
         {
             this.RecordID = Guid.NewGuid();
         }
         else
         {
             this.RecordID = new Guid(base.Request.QueryString["RecordID"].ToString());
         }
         this.PrjCode = base.Request.QueryString["PrjCode"].ToString();
         this.opType  = base.Request.QueryString["opType"].ToString();
         if (this.opType == "add")
         {
             userManageDb userManageDb = new userManageDb();
             this.txtUser.Text    = userManageDb.GetUserName(base.UserCode);
             this.dbDate.Text     = DateTime.Now.ToShortDateString();
             this.HdnPerson.Value = base.UserCode;
             this.TxtPerson.Value = userManageDb.GetUserName(base.UserCode);
         }
         if (this.opType == "edit")
         {
             DataTable singleCostInputPriTable = CostInputPriAction.getSingleCostInputPriTable(this.RecordID);
             this.txtItemName.Text = singleCostInputPriTable.Rows[0]["CostItemName"].ToString();
             this.dbDate.Text      = Convert.ToDateTime(singleCostInputPriTable.Rows[0]["HappenDate"].ToString()).ToShortDateString();
             this.txtDept.Text     = singleCostInputPriTable.Rows[0]["HappenUnit"].ToString();
             this.txtUser.Text     = singleCostInputPriTable.Rows[0]["FillPeople"].ToString();
             this.HdnPerson.Value  = singleCostInputPriTable.Rows[0]["TouchMan"].ToString();
             this.TxtPerson.Value  = com.jwsoft.pm.entpm.PageHelper.QueryUser(this, singleCostInputPriTable.Rows[0]["TouchMan"].ToString());
         }
         DataTable costInputSlaveTable = CostInputSlaveAction.getCostInputSlaveTable(this.RecordID);
         this.ViewState["CostSlave"]      = costInputSlaveTable;
         this.dgCostInputSlave.DataSource = (DataTable)this.ViewState["CostSlave"];
         this.dgCostInputSlave.DataBind();
         this.btnDel.Attributes["onclick"] = "javascript:doWith();";
     }
 }