示例#1
0
 public void GetPurchaseOrder()
 {
     try
     {
         int POId = Convert.ToInt32(Request.QueryString["Id"]);
         DSdtls = obj_EstimateMaster.GetPOForPrint(POId, out StrError);
         if (DSdtls.Tables.Count > 0)
         {
             if (DSdtls.Tables[0].Rows.Count > 0)
             {
                 //PONo,CONVERT(nvarchar,PODate,106) as PODate,SM.SuplierName
                 lblPono.Text    = Obj_Comm.ToTitleCase(DSdtls.Tables[0].Rows[0]["PONo"].ToString());
                 lblPODate.Text  = Obj_Comm.ToTitleCase(DSdtls.Tables[0].Rows[0]["PODate"].ToString());
                 lblSuplier.Text = Obj_Comm.ToTitleCase(DSdtls.Tables[0].Rows[0]["SuplierName"].ToString());
             }
             if (DSdtls.Tables[1].Rows.Count > 0)
             {
                 PurOrderGrid.DataSource = DSdtls.Tables[1];
                 PurOrderGrid.DataBind();
                 ViewState["ImportExel"] = DSdtls.Tables[1];
             }
             if (DSdtls.Tables[2].Rows.Count > 0)
             {
                 TermsGrid.DataSource = DSdtls.Tables[2];
                 TermsGrid.DataBind();
                 ViewState["TermConditn"] = DSdtls.Tables[2];
             }
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
示例#2
0
 public void GetPurchaseOrder()
 {
     try
     {
         int POId = Convert.ToInt32(Request.QueryString["Id"]);
         DSdtls = obj_Return.BindForPrint(POId, out StrError);
         if (DSdtls.Tables.Count > 0)
         {
             if (DSdtls.Tables[0].Rows.Count > 0)
             {
                 lblDebitNoteNo.Text = (DSdtls.Tables[0].Rows[0]["DebotNoteNo"].ToString());
                 lblDate.Text        = (DSdtls.Tables[0].Rows[0]["ReturnDate"].ToString());
                 lblSuplier.Text     = Obj_Comm.ToTitleCase(DSdtls.Tables[0].Rows[0]["VendorName"].ToString());
                 lblSupAddress.Text  = Obj_Comm.ToTitleCase(DSdtls.Tables[0].Rows[0]["Address"].ToString());
                 lblSysDate.Text     = Obj_Comm.ToTitleCase(DSdtls.Tables[0].Rows[0]["Date"].ToString());
                 lblSysTime.Text     = Obj_Comm.ToTitleCase(DSdtls.Tables[0].Rows[0]["Time"].ToString());
             }
             if (DSdtls.Tables[1].Rows.Count > 0)
             {
                 PurOrderGrid.DataSource = DSdtls.Tables[1];
                 PurOrderGrid.DataBind();
                 ViewState["ImportExel"] = DSdtls.Tables[1];
             }
             if (DSdtls.Tables[2].Rows.Count > 0)
             {
                 LblNetAmt.Text = (DSdtls.Tables[2].Rows[0]["Amount"].ToString()) + " /-";
             }
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }