Beispiel #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            dtgridList = (DataTable)ViewState["dtgridList"];
            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;
            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);
            }
        }
Beispiel #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();
        }
Beispiel #3
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();
            }
        }