Example #1
0
    protected void btnget_Click(object sender, EventArgs e)
    {
        pnlDetails.Visible = true;
        btnconfirm.Enabled = true;
        docno.InnerHtml    = txtdocno.Text.Trim();
        txtempc.Visible    = true;
        lblemp.Visible     = true;
        DataSet ds6 = new DataSet();

        ds6 = SpecimanDetails.Idv_Get_SpecimenDetails_By_DocNo(Convert.ToInt32(txtdocno.Text), "allbydocno");
        grdconfirm.DataSource = ds6.Tables[0];
        grdconfirm.DataBind();
        lblempname1.InnerHtml    = Convert.ToString(ds6.Tables[1].Rows[0][0]) + " " + Convert.ToString(ds6.Tables[1].Rows[0][1]);
        lblspinstruct.InnerHtml  = Convert.ToString(ds6.Tables[1].Rows[0]["SpInstruction"]);
        lbldescription.InnerHtml = Convert.ToString(ds6.Tables[1].Rows[0]["Description"]);
        string jv = "";

        if (grdconfirm.Rows.Count <= 0)
        {
            btnconfirm.Visible = false;
            btnPrint.Visible   = false;

            jv = "document.getElementById('ctl00_ContentPlaceHolder1_uc_ConfirmDC1_btnconfirm').style.display='none';";
        }
        else
        {
            btnconfirm.Visible = true;
            btnPrint.Visible   = true;
            jv = "document.getElementById('ctl00_ContentPlaceHolder1_uc_ConfirmDC1_btnconfirm').style.display='visible';";
        }
        ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "a", jv, true);
        txtempc.Focus();
    }
Example #2
0
    protected void btnget_Click(object sender, EventArgs e)
    {
        DataSet ds = new DataSet();

        ds = SpecimanDetails.Idv_Get_SpecimenDetails_By_DocNo(Convert.ToInt32(txtdoc.Text), "CanceledSpecimen");

        if (ds.Tables[0].Rows.Count > 0)
        {
            lbldocno.Text   = ds.Tables[0].Rows[0]["DocumentNo"].ToString();
            lblorderno.Text = ds.Tables[0].Rows[0]["OrderNo"].ToString();
            //txtsalemanCode.Text = dt.Rows[0]["SalesmanCode"].ToString();
            lblsalesman.Text     = ds.Tables[0].Rows[0]["SalesmanName"].ToString();
            lblorderdate.Text    = ds.Tables[0].Rows[0]["OrderDate"].ToString();
            lbldocdate.Text      = ds.Tables[0].Rows[0]["DocumentDate"].ToString();
            lblcanceleddate.Text = ds.Tables[0].Rows[0]["CancelDate"].ToString();
        }
        grdBookDetails.DataSource = ds.Tables[1];
        grdBookDetails.DataBind();
    }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["d"] == "b")
     {
         grdpending.DataSource = SpecimanDetails.Get_Specimen_NotConfirmed_Books();
         grdpending.DataBind();
     }
     else if (Request.QueryString["d"] != null)
     {
         DataSet ds = new DataSet();
         ds = SpecimanDetails.Idv_Get_SpecimenDetails_By_DocNo(Convert.ToInt32(Request.QueryString["d"].ToString().Trim()), "allbydocno");
         DataView dv = new DataView(ds.Tables[0]);
         DocumentNo.InnerHtml    = ds.Tables[0].Rows[0]["DocumentNo"].ToString();
         Todaydate.InnerHtml     = DateTime.Now.ToString("dd/MM/yyyy");
         MRname.InnerHtml        = ds.Tables[1].Rows[0]["Name"].ToString();
         spnaddress.InnerHtml    = ds.Tables[1].Rows[0]["Address"].ToString();
         spinstruction.InnerHtml = ds.Tables[1].Rows[0]["SpInstruction"].ToString();
         Description.InnerHtml   = ds.Tables[1].Rows[0]["Description"].ToString();
         grdpending.DataSource   = dv;
         grdpending.DataBind();
     }
 }