Exemplo n.º 1
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     dtgridList = (DataTable)ViewState["dtgridList"];
     string users = Session["id"].ToString();
     FrameWork.DRSIForm drsi = new FrameWork.DRSIForm();
     FrameWork.DRSISub drsisub = new DRSISub();
     busDISRForm busDISR = new busDISRForm();
     drsi.CustomerFKID = int.Parse(this.drpCustomer.SelectedValue);
     drsi.ProductFKID = int.Parse(this.drpProduct.SelectedValue);
     drsi.TotalPcs = lblPcs.Text;
     drsi.TotalUOM = lblUOM.Text;
     drsi.TotalWeight = lblWeight.Text;
     drsi.TotalUnitCost = txtCost.Text;
     drsi.TotalCost = lblTCost.Text;
     drsi.OrderBy = users;
     string x = busDISR.insertDRSI(drsi);
     foreach (DataRow dr in dtgridList.Rows)
     {
         drsisub.DRSiformID = int.Parse(x);
         drsisub.BatchNo = dr["BatchNo"].ToString();
         drsisub.ModuleNo = dr["ModuleNo"].ToString();
         drsisub.CageNo = dr["CageNo"].ToString();
         drsisub.Weight = dr["Weight"].ToString();
         drsisub.UnitOfMeasure = dr["UnitOfMeasure"].ToString();
         busDISR.insertDRSIsub(drsisub);
     }
 }
Exemplo n.º 2
0
 protected void GridView_SelectedIndexChanged(object sender, EventArgs e)
 {
     string hello = "";
     hello = GridView1.SelectedDataKey["id"].ToString();
     busDISRForm busDISR = new busDISRForm();
     FrameWork.DRSISub[] frmDRSI;
     frmDRSI = busDISR.allDrSIFormSub(hello);
     GridView2.DataSource = frmDRSI;
     GridView2.DataBind();
 }
Exemplo n.º 3
0
        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            busDISRForm busDISR = new busDISRForm();
            FrameWork.DRSIForm[] frmDRSI;

            frmDRSI = busDISR.allDrSIForm();
            this.GridView1.PageIndex = e.NewPageIndex;
            this.GridView1.DataSource = frmDRSI;
            this.GridView1.DataBind();
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["user"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            if (!IsPostBack)
            {
                busDISRForm busDISR = new busDISRForm();
                FrameWork.DRSIForm[] frmDRSI;

                frmDRSI = busDISR.allDrSIForm();
                GridView1.DataSource = frmDRSI;
                GridView1.DataBind();

            }
        }