void LoadCustomer() { clsCustomer obj = new clsCustomer(); obj.Op = 3; DataTable dt = obj.CustomerMaster(obj).Tables[0]; for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["Logo"].ToString() != "") { dt.Rows[i]["Logo"] = "~/" + dt.Rows[i]["Logo"].ToString(); } } grdCustomer.DataSource = dt; grdCustomer.DataBind(); if (grdCustomer.Rows.Count > 0) { lblError.Text = ""; } else { lblError.Text = "No Records found"; } }
protected void btnDelete_Click(object sender, EventArgs e) { clsCustomer obj = new clsCustomer(); obj.ID = Convert.ToInt32(hdEID.Value); obj.Op = 2; obj.CustomerMaster(obj); msg.Text = "<script type='text/javascript'>alert('Deleted');</script>"; pnlUpdate.Visible = false; pnlExisting.Visible = true; LoadCustomer(); }
protected void btnUpdate_Click(object sender, EventArgs e) { clsCustomer obj = new clsCustomer(); obj.ID = Convert.ToInt32(hdEID.Value); obj.Name = txtEName.Text; obj.Address = txtEAddress.Text; obj.Phone = txtEPhone.Text; obj.Email = txtEEmail.Text; obj.Logo = UpdateImage(); obj.Op = 5; obj.CustomerMaster(obj); msg.Text = "<script type='text/javascript'>alert('Updated');</script>"; pnlUpdate.Visible = false; pnlExisting.Visible = true; LoadCustomer(); }
protected void btnSave_Click(object sender, EventArgs e) { clsCustomer obj = new clsCustomer(); obj.Name = txtName.Text; obj.Address = txtAddress.Text; obj.Phone = txtPhone.Text; obj.Email = txtEmail.Text; obj.Logo = UploadImage(); obj.Op = 1; obj.CustomerMaster(obj); msg.Text = "<script type='text/javascript'>alert('Saved');</script>"; LoadCustomer(); txtName.Text = ""; txtAddress.Text = ""; txtEmail.Text = ""; txtPhone.Text = ""; pnlExisting.Visible = true; }
void LoadOrder() { clsIndent obIndent = new clsIndent(); clsCustomer obCustomer = new clsCustomer(); clsSite obSite = new clsSite(); clsIndentItems obIndentItems = new clsIndentItems(); clsUser obU = new clsUser(); clsCompany obC = new clsCompany(); DataTable dtCustomer; //Company Detail obC.Op = 3; DataTable dtCompany = obC.CompanyMster(obC).Tables[0]; //Indent detail obIndent.ID = Convert.ToInt32(Request.QueryString["ID"]); obIndent.Op = 4; DataTable dtIndent = obIndent.IndentMaster(obIndent).Tables[0]; //User Detail obU.Op = 5; obU.ID = Convert.ToInt32(dtIndent.Rows[0]["Indentor"]); DataTable dtIndentor = obU.UserMaster(obU).Tables[0]; obU.ID = Convert.ToInt32(dtIndent.Rows[0]["ApprovedBy"]); DataTable dtApprovedBy = obU.UserMaster(obU).Tables[0]; //Customer Detail if (Convert.ToInt32(dtIndent.Rows[0]["OrderFrom"]) == 1) { //Site Detail obSite.Op = 5; obSite.ID = Convert.ToInt32(dtIndent.Rows[0]["OrderFromID"]); dtCustomer = obSite.SiteMaster(obSite).Tables[0]; } else { //Customer Detail obCustomer.ID = Convert.ToInt32(dtIndent.Rows[0]["OrderFromID"]); obCustomer.Op = 4; dtCustomer = obCustomer.CustomerMaster(obCustomer).Tables[0]; } //Indent Items obIndentItems.IndentID = Convert.ToInt32(Request.QueryString["ID"]); obIndentItems.Op = 2; DataTable dtIndentItems = obIndentItems.IndentItemMaster(obIndentItems).Tables[0]; LiteralControl lc = new LiteralControl(); lc.Text = ""; lc.Text = lc.Text + "<div class='row'>"; lc.Text = lc.Text + "<div class='col-lg-12'><center><h3>" + dtCompany.Rows[0]["Name"] + "</h3></center></div>"; lc.Text = lc.Text + "<div class='col-lg-12'><center>Project Name: " + dtIndent.Rows[0]["ProjectNo"] + "</center></div>"; lc.Text = lc.Text + "<div class='col-lg-12'><center>Job No: " + dtIndent.Rows[0]["JobNo"] + "</center></div>"; lc.Text = lc.Text + "<div class='col-lg-12'><center><h3><u>INDENT FORM</u></h3></center></div>"; lc.Text = lc.Text + "<div class='col-lg-9'>Ref No:" + dtIndent.Rows[0]["RefNo"] + "</div>"; lc.Text = lc.Text + "<div class='col-lg-3'>Date:" + Convert.ToDateTime(dtIndent.Rows[0]["IndentDate"]).ToShortDateString() + "</div>"; lc.Text = lc.Text + "<div class='col-lg-12' style='height:50px'></div>"; lc.Text = lc.Text + "<div class='col-lg-12' style='height:500px'>"; //Items// lc.Text = lc.Text + "<table width='100%' border='1' align='center'>"; lc.Text = lc.Text + "<tr><td>Serial No</td><td>Part No</td><td>Particular Description</td><td>Current Stock</td><td>Quantity</td><td>Remarks</td></tr>"; int i = 0; foreach (DataRow drItems in dtIndentItems.Rows) { i++; lc.Text = lc.Text + "<tr>"; lc.Text = lc.Text + "<td>" + i.ToString() + "</td>"; lc.Text = lc.Text + "<td>" + drItems["PartNo"] + "</td>"; lc.Text = lc.Text + "<td>" + drItems["Particular"].ToString().Replace("\n", "<br>") + "</td>"; lc.Text = lc.Text + "<td>" + drItems["CurrentStock"] + "</td>"; lc.Text = lc.Text + "<td>" + drItems["Quantity"] + "</td>"; lc.Text = lc.Text + "<td>" + drItems["Remarks"] + "</td>"; lc.Text = lc.Text + "</tr>"; } lc.Text = lc.Text + "</table>"; //Items lc.Text = lc.Text + "</div>"; lc.Text = lc.Text + "<div class='col-lg-12'>"; lc.Text = lc.Text + "<table width='100%' border='1' align='center'>"; lc.Text = lc.Text + "<tr height='100' align='center'><td>"; lc.Text = lc.Text + "<img src='../" + dtIndentor.Rows[0]["Signature"] + "' height='50' width='120'/>"; lc.Text = lc.Text + "<br>Indentor: " + dtIndentor.Rows[0]["Name"] + "</td>"; lc.Text = lc.Text + "<td>"; if (dtApprovedBy.Rows.Count > 0) { lc.Text = lc.Text + "<img src='../" + dtApprovedBy.Rows[0]["Signature"] + "' height='50' width='120'/>"; lc.Text = lc.Text + "<br>Approved By: " + dtApprovedBy.Rows[0]["Name"]; } lc.Text = lc.Text + "</td></tr></table>"; lc.Text = lc.Text + "</div>"; lc.Text = lc.Text + "</div>"; Label lb = new Label(); lb.Text = lc.ToString(); pnlDetail.Controls.Add(lc); if (dtApprovedBy.Rows.Count == 0) { pnlApprove.Visible = true; } else { pnlApprove.Visible = false; } }
void LoadOrderForPDF() { clsIndent obIndent = new clsIndent(); clsCustomer obCustomer = new clsCustomer(); clsSite obSite = new clsSite(); clsIndentItems obIndentItems = new clsIndentItems(); clsUser obU = new clsUser(); clsCompany obC = new clsCompany(); DataTable dtCustomer; //Company Detail obC.Op = 3; DataTable dtCompany = obC.CompanyMster(obC).Tables[0]; //Indent detail obIndent.ID = Convert.ToInt32(Request.QueryString["ID"]); obIndent.Op = 4; DataTable dtIndent = obIndent.IndentMaster(obIndent).Tables[0]; //User Detail obU.Op = 5; obU.ID = Convert.ToInt32(dtIndent.Rows[0]["Indentor"]); DataTable dtIndentor = obU.UserMaster(obU).Tables[0]; obU.ID = Convert.ToInt32(dtIndent.Rows[0]["ApprovedBy"]); DataTable dtApprovedBy = obU.UserMaster(obU).Tables[0]; //Customer Detail if (Convert.ToInt32(dtIndent.Rows[0]["OrderFrom"]) == 1) { //Site Detail obSite.Op = 5; obSite.ID = Convert.ToInt32(dtIndent.Rows[0]["OrderFromID"]); dtCustomer = obSite.SiteMaster(obSite).Tables[0]; } else { //Customer Detail obCustomer.ID = Convert.ToInt32(dtIndent.Rows[0]["OrderFromID"]); obCustomer.Op = 4; dtCustomer = obCustomer.CustomerMaster(obCustomer).Tables[0]; } //Indent Items obIndentItems.IndentID = Convert.ToInt32(Request.QueryString["ID"]); obIndentItems.Op = 2; DataTable dtIndentItems = obIndentItems.IndentItemMaster(obIndentItems).Tables[0]; LiteralControl lc = new LiteralControl(); lc.Text = ""; lc.Text = lc.Text + "<table width='100%'>"; lc.Text = lc.Text + "<tr><td colspan='12' align='center'><h3>" + dtCompany.Rows[0]["Name"] + "</h3></td></tr>"; lc.Text = lc.Text + "<tr><td colspan='12' align='center'>Project Name: " + dtIndent.Rows[0]["ProjectNo"] + "</h3></td></tr>"; lc.Text = lc.Text + "<tr><td colspan='12' align='center'>Job No: " + dtIndent.Rows[0]["JobNo"] + "</h3></td></tr>"; lc.Text = lc.Text + "<tr><td colspan='12' align='center'><h3><u>INDENT FORM</u></h3></td></tr>"; lc.Text = lc.Text + "<tr><td colspan='9' align='left'>Ref No:" + dtIndent.Rows[0]["RefNo"] + "</td>"; lc.Text = lc.Text + "<td colspan='3' align='right'>Date:" + Convert.ToDateTime(dtIndent.Rows[0]["IndentDate"]).ToShortDateString() + "</td></tr>"; lc.Text = lc.Text + "<tr><td colspan='12' style='height:50'></td></tr>"; lc.Text = lc.Text + "<tr><td colspan='12'>"; //Items// lc.Text = lc.Text + "<table width='100%' border='1' align='center'>"; lc.Text = lc.Text + "<tr><td colspan='1' align='center'>Serial No</td><td colspan='2' align='left'>Part No</td><td colspan='4' align='left'>Particular Description</td><td colspan='1' align='center'>Current Stock</td><td colspan='1' align='center'>Quantity</td><td colspan='3' align='left'>Remarks</td></tr>"; int i = 0; foreach (DataRow drItems in dtIndentItems.Rows) { i++; lc.Text = lc.Text + "<tr>"; lc.Text = lc.Text + "<td colspan='1' align='center'>" + i.ToString() + "</td>"; lc.Text = lc.Text + "<td colspan='2' align='left'>" + drItems["PartNo"] + "</td>"; lc.Text = lc.Text + "<td colspan='4' align='left'>" + drItems["Particular"].ToString().Replace("\n", "<br>") + "</td>"; lc.Text = lc.Text + "<td colspan='1' align='center'>" + drItems["CurrentStock"] + "</td>"; lc.Text = lc.Text + "<td colspan='1' align='center'>" + drItems["Quantity"] + "</td>"; lc.Text = lc.Text + "<td colspan='3' align='left'>" + drItems["Remarks"] + "</td>"; lc.Text = lc.Text + "</tr>"; } if (i < 20) { i = 20 - i; while (i > 0) { lc.Text = lc.Text + "<tr border='0'><td colspan='12' border='0'><br></td></tr>"; i--; } } lc.Text = lc.Text + "</table>"; //Items lc.Text = lc.Text + "</td></tr>"; lc.Text = lc.Text + "<tr><td colspan='12'>"; lc.Text = lc.Text + "<table width='100%' border='1' align='center'>"; lc.Text = lc.Text + "<tr height='100'><td align='center'>"; try { if (dtIndentor.Rows[0]["Signature"].ToString().Trim() != "") { lc.Text = lc.Text + "<img src='" + MapPath("~/" + dtIndentor.Rows[0]["Signature"]) + "' height='50' width='120'/>"; } lc.Text = lc.Text + "<br>Indentor: " + dtIndentor.Rows[0]["Name"] + "</td>"; } catch { } lc.Text = lc.Text + "<td align='center'>"; if (dtApprovedBy.Rows.Count > 0) { try { if (dtApprovedBy.Rows[0]["Signature"].ToString().Trim() != "") { lc.Text = lc.Text + "<img src='" + MapPath("~/" + dtApprovedBy.Rows[0]["Signature"]) + "' height='50' width='120'/>"; } lc.Text = lc.Text + "<br>Approved By: " + dtApprovedBy.Rows[0]["Name"]; } catch { } } lc.Text = lc.Text + "</td></tr></table>"; lc.Text = lc.Text + "</td></tr>"; lc.Text = lc.Text + "</table>"; Label lb = new Label(); lb.Text = lc.ToString(); pnlDetail.Controls.Add(lc); }
void LoadOrderForPDF() { clsIndent obIndent = new clsIndent(); clsCustomer obCustomer = new clsCustomer(); clsSite obSite = new clsSite(); clsPurchaseOrder obPO = new clsPurchaseOrder(); clsPOParticulars obPOP = new clsPOParticulars(); clsPOTerms obPOT = new clsPOTerms(); clsUser obU = new clsUser(); clsCompany obC = new clsCompany(); clsSiteMachines obSM = new clsSiteMachines(); DataTable dtCustomer; //Company Detail obC.Op = 3; DataTable dtCompany = obC.CompanyMster(obC).Tables[0]; //Purchase Order Detail obPO.Op = 3; obPO.ID = Convert.ToInt32(Request.QueryString["ID"]); DataTable dtPO = obPO.PurchaseOrderMaster(obPO).Tables[0]; //Indent detail obIndent.RefNo = dtPO.Rows[0]["IndentRefNo"].ToString(); obIndent.Op = 8; DataTable dtIndent = obIndent.IndentMaster(obIndent).Tables[0]; //Purchase Order Particulars obPOP.POID = Convert.ToInt32(Request.QueryString["ID"]); obPOP.Op = 2; DataTable dtPOItems = obPOP.POParticularsMaster(obPOP).Tables[0]; //Purchase Order terms obPOT.POID = Convert.ToInt32(Request.QueryString["ID"]); obPOT.Op = 3; DataTable dtPOTerms = obPOT.POTermsMaster(obPOT).Tables[0]; //User Detail obU.Op = 5; obU.ID = Convert.ToInt32(dtPO.Rows[0]["PreparedBy"]); DataTable dtPreparedBy = obU.UserMaster(obU).Tables[0]; obU.ID = Convert.ToInt32(dtPO.Rows[0]["CheckedBy"]); DataTable dtCheckedBy = obU.UserMaster(obU).Tables[0]; //Site Detail obSite.Op = 5; obSite.ID = Convert.ToInt32(dtPO.Rows[0]["SiteID"]); dtCustomer = obSite.SiteMaster(obSite).Tables[0]; //Machine Detail obSM.Op = 5; obSM.ID = Convert.ToInt32(dtPO.Rows[0]["SiteMachineID"]); DataTable dtSM = obSM.SiteMachines(obSM).Tables[0]; //Machine Detail //Purchase Order To detail// clsCustomer ObPOTo = new clsCustomer(); ObPOTo.Op = 4; ObPOTo.ID = Convert.ToInt32(dtPO.Rows[0]["POTo"]); DataTable dtPOTo = ObPOTo.CustomerMaster(ObPOTo).Tables[0]; //Purchase order to detail// LiteralControl lc = new LiteralControl(); lc.Text = "<div style='width:100%; margin:50 padding:50;'>"; lc.Text = lc.Text + "<table width='100%' style='font-size:8'>"; lc.Text = lc.Text + "<tr><td align='left' colspan='9'>"; lc.Text = lc.Text + "<h5>" + dtCompany.Rows[0]["Name"] + "<br>" + dtCompany.Rows[0]["Address"].ToString().Replace("\n", "<br>") + "</h5>"; lc.Text = lc.Text + "<h6>TIN:" + dtCompany.Rows[0]["Tin"] + "<br>CST:" + dtCompany.Rows[0]["Cst"] + "</h6>"; lc.Text = lc.Text + "</td>"; lc.Text = lc.Text + "<td align='right' colspan='3'>"; try { lc.Text = lc.Text + "<img src='" + MapPath("~/" + dtCompany.Rows[0]["Logo"]) + "' height='100' width='100' />"; } catch { lc.Text = lc.Text + "<img src='" + MapPath("~/" + dtCompany.Rows[0]["Logo"]) + "' height='100' width='100' />"; } lc.Text = lc.Text + "</td></tr>"; lc.Text = lc.Text + "<tr><td align='center' colspan='12'><h5><b>Purchase Order</b></h5></td></tr>"; lc.Text = lc.Text + "<tr><td align='left' colspan='6'>"; lc.Text = lc.Text + "PO Ref No: " + dtPO.Rows[0]["PORefNo"] + "<br />"; lc.Text = lc.Text + "To,<br />"; lc.Text = lc.Text + dtCustomer.Rows[0]["Name"] + "<br>"; lc.Text = lc.Text + dtCustomer.Rows[0]["Location"] + "<br>"; lc.Text = lc.Text + dtCustomer.Rows[0]["Address"].ToString().Replace("\n", "<br>") + "<br>"; if (dtCustomer.Rows[0]["PhoneNo"].ToString() != "") { lc.Text = lc.Text + "Phone No:" + dtCustomer.Rows[0]["PhoneNo"] + "<br>"; } if (dtCustomer.Rows[0]["Email"].ToString() != "") { lc.Text = lc.Text + "Email ID:" + dtCustomer.Rows[0]["Email"] + "<br>"; } if (dtPOTo.Rows.Count > 0) { lc.Text = lc.Text + "<b>Purchase Order To,</b><br>"; lc.Text = lc.Text + dtPOTo.Rows[0]["Name"].ToString() + "<br>"; lc.Text = lc.Text + "Phone No:" + dtPOTo.Rows[0]["Phone"].ToString() + "<br>"; lc.Text = lc.Text + dtPOTo.Rows[0]["Address"].ToString().Replace("\n", "<br>"); } lc.Text = lc.Text + "</td>"; lc.Text = lc.Text + "<td align='right' colspan='6'>"; lc.Text = lc.Text + "Date:" + Convert.ToDateTime(dtPO.Rows[0]["PODate"]).ToShortDateString(); lc.Text = lc.Text + "</td></tr>"; lc.Text = lc.Text + "<tr><td colspan='12'><br></td></tr>"; lc.Text = lc.Text + "<tr><td colspan='4'>Machine: " + dtSM.Rows[0]["Machine"] + "</td><td colspan='4'>Log No: " + dtSM.Rows[0]["SerialNo"] + "</td><td colspan='4'>Registration No: " + dtSM.Rows[0]["RegistrationNo"] + "</td></tr>"; lc.Text = lc.Text + "<tr><td colspan='12'>"; lc.Text = lc.Text + "<table width='100%' align='center' border='1'><tr align='left'><td colspan='6'>"; lc.Text = lc.Text + "Quotation No:" + dtPO.Rows[0]["QuotationNo"] + "<br />"; lc.Text = lc.Text + "Date:" + Convert.ToDateTime(dtPO.Rows[0]["QuotationDate"]).ToShortDateString(); lc.Text = lc.Text + "</td>"; lc.Text = lc.Text + "<td colspan='6'>"; if (dtIndent.Rows.Count > 0) { lc.Text = lc.Text + "Indent Date:" + Convert.ToDateTime(dtIndent.Rows[0]["IndentDate"]).ToShortDateString(); } lc.Text = lc.Text + "</td>"; lc.Text = lc.Text + "</tr></table></td></tr>"; lc.Text = lc.Text + "<tr><td align='left' colspan='12'>Subject:" + dtPO.Rows[0]["Subject"] + "</td></tr>"; lc.Text = lc.Text + "<tr><td align='left' colspan='12'>"; lc.Text = lc.Text + txtMessage.Text.Replace("\n", "<br>"); lc.Text = lc.Text + "</td></tr>"; lc.Text = lc.Text + "</table>"; /*TEST*/ lc.Text = lc.Text + "<table width='100%' style='font-size:8' border='1'>"; lc.Text = lc.Text + "<tr align='left'><td>SL</td><td>Part No</td><td colspan='2'>Item</td><td>Stock</td><td>Qty</td><td>UOM</td><td>Rate</td><td>Tax</td><td>Amount</td><td colspan='2'>Remarks</td></tr>"; int i = 0; foreach (DataRow drItems in dtPOItems.Rows) { i++; lc.Text = lc.Text + "<tr align='left'><td>" + i.ToString() + "</td>"; lc.Text = lc.Text + "<td>" + drItems["PartNo"] + "</td>"; lc.Text = lc.Text + "<td colspan='2'>" + drItems["Item"] + "</td>"; lc.Text = lc.Text + "<td>" + drItems["CurrentStock"] + "</td>"; lc.Text = lc.Text + "<td>" + drItems["Qty"] + "</td>"; lc.Text = lc.Text + "<td>" + drItems["UGM"] + "</td>"; lc.Text = lc.Text + "<td>" + drItems["Rate"] + "</td>"; lc.Text = lc.Text + "<td>" + drItems["Tax"] + "</td>"; lc.Text = lc.Text + "<td>" + drItems["Amount"] + "</td>"; lc.Text = lc.Text + "<td colspan='2'>" + drItems["Remark"] + "</td></tr>"; } lc.Text = lc.Text + "</table>"; lc.Text = lc.Text + "<table width='100%' style='font-size:8'>"; lc.Text = lc.Text + "</table>"; lc.Text = lc.Text + "<table width='100%' style='font-size:8'>"; lc.Text = lc.Text + "<tr><td colspan='12'><h6>Summery</h6></td></tr>"; lc.Text = lc.Text + "<tr><td colspan='8' align='right'>Total Amount</td><td></td><td align='right' colspan='3'>" + dtPO.Rows[0]["TotalAmount"] + "/- INR</td></tr>"; lc.Text = lc.Text + "<tr><td colspan='8' align='right'>" + dtPO.Rows[0]["TaxName"] + "</td><td></td><td align='right' colspan='3'>" + (Convert.ToDouble(dtPO.Rows[0]["TotalAmount"]) * Convert.ToDouble(dtPO.Rows[0]["TaxPercentage"]) / 100).ToString() + "/- INR</td></tr>"; lc.Text = lc.Text + "<tr><td colspan='8' align='right'>Discount " + dtPO.Rows[0]["DiscountPercentage"] + "%</td><td></td><td align='right' colspan='3'>" + (Convert.ToDouble(dtPO.Rows[0]["TotalAmount"]) * Convert.ToDouble(dtPO.Rows[0]["DiscountPercentage"]) / 100).ToString() + "/-INR</td></tr>"; lc.Text = lc.Text + "<tr><td colspan='8' align='right'>Net Payable</td><td></td><td align='right' colspan='3'>" + dtPO.Rows[0]["NetPayable"] + "/-INR</td></tr>"; lc.Text = lc.Text + "</table>"; /*TEST*/ lc.Text = lc.Text + "<table width='100%' style='font-size:8' border='1'>"; //---------------- lc.Text = lc.Text + "<tr><td colspan='12' align='left'><h6><i>Terms & Conditions:</i></h6></td></tr>"; //Terms lc.Text = lc.Text + "</table>"; lc.Text = lc.Text + "<table width='100%' style='font-size:8' border='1'>"; foreach (DataRow drTerms in dtPOTerms.Rows) { lc.Text = lc.Text + "<tr align='left'><td colspan='3'>" + drTerms["Heading"] + "</td><td colspan='9'>" + drTerms["Detail"] + "</td></tr>"; } lc.Text = lc.Text + "</table>"; //Terms lc.Text = lc.Text + "<table width='100%' style='font-size:8'>"; lc.Text = lc.Text + "<tr><td colspan='12' align='center'><br><br></td></tr>"; lc.Text = lc.Text + "<tr height='100'><td colspan='4'>"; if (dtPreparedBy.Rows[0]["Signature"].ToString().Trim() != "") { lc.Text = lc.Text + "<img src='" + MapPath("~/" + dtPreparedBy.Rows[0]["Signature"]) + "' height='50' width='120'/>"; } lc.Text = lc.Text + "<br>Prepared By</td>"; lc.Text = lc.Text + "<td colspan='4' align='center'>"; if (dtCheckedBy.Rows[0]["Signature"].ToString().Trim() != "") { lc.Text = lc.Text + "<img src='" + MapPath("~/" + dtCheckedBy.Rows[0]["Signature"]) + "' height='50' width='120'/>"; } lc.Text = lc.Text + "<br>Checked By</td>"; lc.Text = lc.Text + "<td colspan='4' align='right'>Authorized Signatory<br /><br /><br />" + dtCompany.Rows[0]["Name"] + "</td></tr>"; lc.Text = lc.Text + "</table>"; lc.Text = lc.Text + "</div>"; Label lb = new Label(); lb.Text = lc.ToString(); pnlDetail.Controls.Add(lc); }