private void LoadDGFTPN(GridView eGrid) { DGFTpublicnotices_GETALLTableAdapter index = new DGFTpublicnotices_GETALLTableAdapter(); DataTable dtActsIndexName = index.GetAllDgftPN(); if (dtActsIndexName.Rows.Count > 0) { editGrid.Visible = true; editGrid.DataSource = dtActsIndexName; editGrid.DataBind(); if (editGrid.Columns.Count > 0) editGrid.Columns[0].Visible = false; else { editGrid.HeaderRow.Cells[1].Visible = false; editGrid.HeaderRow.Cells[2].Visible = false; editGrid.HeaderRow.Cells[7].Visible = false; editGrid.HeaderRow.Cells[8].Visible = false; foreach (GridViewRow gvr in editGrid.Rows) { gvr.Cells[1].Visible = false; gvr.Cells[2].Visible = false; gvr.Cells[7].Visible = false; gvr.Cells[8].Visible = false; } } // editGrid.Columns[1].Visible = false; } }
protected void editGrid_RowDeleting(object sender, GridViewDeleteEventArgs e) { GridView gv = sender as GridView; GridViewRow row = gv.Rows[e.RowIndex]; // int? id = Int32.Parse(row.Cells[2].Text); if (ddlsubcategory.SelectedValue.Equals("Acts") && ddlcatagory.SelectedValue.Equals("Central Excise")) { int? id = Int32.Parse(row.Cells[2].Text); CEActsTableAdapter index = new CEActsTableAdapter(); index.CEDeleteById(id); LoadCEActs(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Rules") && ddlcatagory.SelectedValue.Equals("Central Excise")) { int? id = Int32.Parse(row.Cells[2].Text); CEActsTableAdapter index = new CEActsTableAdapter(); index.CEDeleteById(id); LoadCEActs(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Forms") && ddlcatagory.SelectedValue.Equals("Central Excise")) { int? id = Int32.Parse(row.Cells[2].Text); CEActsTableAdapter index = new CEActsTableAdapter(); index.CEDeleteById(id); LoadCEActs(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Section 37B Order") && ddlcatagory.SelectedValue.Equals("Central Excise")) { int? id = Int32.Parse(row.Cells[2].Text); CEActsTableAdapter index = new CEActsTableAdapter(); index.CEDeleteById(id); LoadCEActs(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Case Laws") && ddlcatagory.SelectedValue.Equals("Central Excise")) { int? id = Int32.Parse(row.Cells[2].Text); CEActsTableAdapter index = new CEActsTableAdapter(); index.CEDeleteById(id); LoadCEActs(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Tariff 2012-13") && ddlcatagory.SelectedValue.Equals("Central Excise")) { int? id = Int32.Parse(row.Cells[1].Text); CentralExcise_Tariff_GetAllTableAdapter index = new CentralExcise_Tariff_GetAllTableAdapter(); index.DeleteTariffById(id); LoadCETariff(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Notifications") && ddlcatagory.SelectedValue.Equals("Central Excise")) { int? id = Int32.Parse(row.Cells[1].Text); CECNotification_GetAllTableAdapter index = new CECNotification_GetAllTableAdapter(); index.DeleteCENotificationById(id); LoadCENotification(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Circulars/Instructions") && ddlcatagory.SelectedValue.Equals("Central Excise")) { int? id = Int32.Parse(row.Cells[5].Text); Circulars_Info_ByyearTableAdapter index = new Circulars_Info_ByyearTableAdapter(); index.DeleteCEcircularsById(id); LoadCECircularsInstructions(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Acts") && ddlcatagory.SelectedValue.Equals("Customs")) { int? id = Int32.Parse(row.Cells[3].Text); ActsTableAdapter index = new ActsTableAdapter(); index.DeleteCustomsById(id); LoadCustoms(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Rules") && ddlcatagory.SelectedValue.Equals("Customs")) { int? id = Int32.Parse(row.Cells[3].Text); ActsTableAdapter index = new ActsTableAdapter(); index.DeleteCustomsById(id); LoadCustoms(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Forms") && ddlcatagory.SelectedValue.Equals("Customs")) { int? id = Int32.Parse(row.Cells[3].Text); ActsTableAdapter index = new ActsTableAdapter(); index.DeleteCustomsById(id); LoadCustoms(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Case Laws") && ddlcatagory.SelectedValue.Equals("Customs")) { int? id = Int32.Parse(row.Cells[3].Text); ActsTableAdapter index = new ActsTableAdapter(); index.DeleteCustomsById(id); LoadCustoms(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Regulations") && ddlcatagory.SelectedValue.Equals("Customs")) { int? id = Int32.Parse(row.Cells[3].Text); ActsTableAdapter index = new ActsTableAdapter(); index.DeleteCustomsById(id); LoadCustoms(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Tariff 2012-13") && ddlcatagory.SelectedValue.Equals("Customs")) { int? id = Int32.Parse(row.Cells[1].Text); Custom_Tariff_GetAllTableAdapter index = new Custom_Tariff_GetAllTableAdapter(); index.DeleteCustomTariffById(id); LoadCustomsTariff(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Notifications") && ddlcatagory.SelectedValue.Equals("Customs")) { int? id = Int32.Parse(row.Cells[1].Text); CECNotification_GetAllTableAdapter index = new CECNotification_GetAllTableAdapter(); index.DeleteCENotificationById(id); LoadCENotification(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Circulars/Instructions") && ddlcatagory.SelectedValue.Equals("Customs")) { int? id = Int32.Parse(row.Cells[5].Text); Circulars_Info_ByyearTableAdapter index = new Circulars_Info_ByyearTableAdapter(); index.DeleteCEcircularsById(id); LoadCECircularsInstructions(editGrid); } if (ddlsubcategory.SelectedValue.Equals("SEZ") && ddlcatagory.SelectedValue.Equals("Customs")) { int? id = Int32.Parse(row.Cells[3].Text); ActsTableAdapter index = new ActsTableAdapter(); index.DeleteCustomsById(id); LoadCustoms(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Drawback Schedule") && ddlcatagory.SelectedValue.Equals("Customs")) { int? id = Int32.Parse(row.Cells[3].Text); ActsTableAdapter index = new ActsTableAdapter(); index.DeleteCustomsById(id); LoadCustoms(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Act 1994") && ddlcatagory.SelectedValue.Equals("Service Tax")) { int? id = Int32.Parse(row.Cells[1].Text); ServiceTax_GetAllTableAdapter index = new ServiceTax_GetAllTableAdapter(); index.DeleteSTById(id); LoadST(editGrid); } if (ddlsubcategory.SelectedValue.Equals("ST Rules") && ddlcatagory.SelectedValue.Equals("Service Tax")) { int? id = Int32.Parse(row.Cells[1].Text); ServiceTax_GetAllTableAdapter index = new ServiceTax_GetAllTableAdapter(); index.DeleteSTById(id); LoadST(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Forms and Registers") && ddlcatagory.SelectedValue.Equals("Service Tax")) { int? id = Int32.Parse(row.Cells[1].Text); ServiceTax_GetAllTableAdapter index = new ServiceTax_GetAllTableAdapter(); index.DeleteSTById(id); LoadST(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Accounting Codes for new services") && ddlcatagory.SelectedValue.Equals("Service Tax")) { int? id = Int32.Parse(row.Cells[1].Text); ServiceTax_GetAllTableAdapter index = new ServiceTax_GetAllTableAdapter(); index.DeleteSTById(id); LoadST(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Case Laws") && ddlcatagory.SelectedValue.Equals("Service Tax")) { int? id = Int32.Parse(row.Cells[1].Text); STCaselaws_GetAllTableAdapter index = new STCaselaws_GetAllTableAdapter(); index.DeleteSTCaseLawsById(id); LoadSTCaseLaws(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Notifications") && ddlcatagory.SelectedValue.Equals("Service Tax")) { int? id = Int32.Parse(row.Cells[1].Text); STN_GetAllTableAdapter index = new STN_GetAllTableAdapter(); index.DeleteSTNById(id); LoadSTNotification(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Circulars/Instructions") && ddlcatagory.SelectedValue.Equals("Service Tax")) { int? id = Int32.Parse(row.Cells[5].Text); Circulars_Info_ByyearTableAdapter index = new Circulars_Info_ByyearTableAdapter(); index.DeleteCEcircularsById(id); LoadCECircularsInstructions(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Acts") && ddlcatagory.SelectedValue.Equals("Income Tax")) { int? id = Int32.Parse(row.Cells[1].Text); IncomeTaxActs_SelectAllTableAdapter index = new IncomeTaxActs_SelectAllTableAdapter(); index.DeleteITActsById(id); LoadITActs(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Rules") && ddlcatagory.SelectedValue.Equals("Income Tax")) { int? id = Int32.Parse(row.Cells[9].Text); IncomeTaxRules_SelectAllTableAdapter index = new IncomeTaxRules_SelectAllTableAdapter(); index.DeleteITRulesById(id); LoadITRules(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Circulars") && ddlcatagory.SelectedValue.Equals("Income Tax")) { int? id = Int32.Parse(row.Cells[1].Text); IncomeTaxCircularsNotification_SelectAllTableAdapter index = new IncomeTaxCircularsNotification_SelectAllTableAdapter(); index.DeleteITCNById(id); LoadITCN(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Notifications") && ddlcatagory.SelectedValue.Equals("Income Tax")) { int? id = Int32.Parse(row.Cells[1].Text); IncomeTaxCircularsNotification_SelectAllTableAdapter index = new IncomeTaxCircularsNotification_SelectAllTableAdapter(); index.DeleteITCNById(id); LoadITCN(editGrid); } if (ddlsubcategory.SelectedValue.Equals("FTP") && ddlcatagory.SelectedValue.Equals("DGFT")) { int? id = Int32.Parse(row.Cells[1].Text); DGFT_GetAllTableAdapter index = new DGFT_GetAllTableAdapter(); index.DeleteDGFTById(id); LoadDGFT(editGrid); } if (ddlsubcategory.SelectedValue.Equals("FTDR Notifications") && ddlcatagory.SelectedValue.Equals("DGFT")) { int? id = Int32.Parse(row.Cells[1].Text); DGFT_GetAllTableAdapter index = new DGFT_GetAllTableAdapter(); index.DeleteDGFTById(id); LoadDGFT(editGrid); } if (ddlsubcategory.SelectedValue.Equals("public notices") && ddlcatagory.SelectedValue.Equals("DGFT")) { int? id = Int32.Parse(row.Cells[1].Text); DGFTpublicnotices_GETALLTableAdapter index = new DGFTpublicnotices_GETALLTableAdapter(); index.DeleteDgftPNById(id); LoadDGFTPN(editGrid); } if (ddlsubcategory.SelectedValue.Equals("Circulars/Instructions") && ddlcatagory.SelectedValue.Equals("DGFT")) { } if (ddlsubcategory.SelectedValue.Equals("SION") && ddlcatagory.SelectedValue.Equals("DGFT")) { } }
public void DGFTpublicnotices() { if (rdbUploadType.SelectedValue == "Upload the Document") { UploadPDF(); } DGFTpublicnotices_GETALLTableAdapter insertDGFTpublicnotices = new DGFTpublicnotices_GETALLTableAdapter(); insertDGFTpublicnotices.Insert(ddlsubcategory.SelectedValue, txtDGFTpublicnoticeindex.Text, txtDGFTpublicnoticenum.Text, txtDGFTpublicnoticesubject.Text, txtDGFTpublicnoticedate.Text, edtData.Content, bytes); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { pnlCActs.Visible = false; pnlCRules.Visible = false; pnlCRegulations.Visible = false; pnlCTariff.Visible = false; pnlCForms.Visible = false; pnlCSEZ.Visible = false; pnlCDrawback.Visible = false; pnlCirculars.Visible = false; pnlSTCaselaws.Visible = false; edtData.Visible = false; uploadDocument.Visible = false; lblPasteHere.Visible = false; lblUploadDoc.Visible = false; btnUpload.Visible = false; rdbUploadType.Visible = false; pnllibrary.Visible = false; pnlDGFTFTDR.Visible = false; pnlDGFTFTP.Visible = false; pnlDGFTpublicnotices.Visible = false; pnlCECnotifications.Visible = false; pnlStNotifications.Visible = false; pnlITType.Visible = false; pnlITIncomeWealthAct.Visible = false; pnpITFinanceAct.Visible = false; pnlITCirculars.Visible = false; // cldate.EndDate = DateTime.Now; } editnotifications epage = Context.Handler as editnotifications; if (epage != null) { ddlcatagory.SelectedValue = epage.Category; ddlcatagory_SelectedIndexChanged(ddlcatagory, EventArgs.Empty); ddlsubcategory.SelectedValue = epage.SubCategory; ddlsubcategory_SelectedIndexChanged(ddlsubcategory, EventArgs.Empty); ddlcatagory.Enabled = false; ddlsubcategory.Enabled = false; hdnId.Value = epage.Id; } if (hdnId.Value.Length > 0) { int? id = Int32.Parse(hdnId.Value); if (btnUpload.Text != "Update") { btnUpload.Text = "Update"; if (ddlsubcategory.SelectedValue.Equals("Case Laws")) { GetAllCaseLawsTableAdapter index = new GetAllCaseLawsTableAdapter(); TaxGenie_DAL.CaseLaws.GetAllCaseLawsDataTable dt = index.GetCaseLawsById(id); TaxGenie_DAL.CaseLaws.GetAllCaseLawsRow row = dt.Rows[0] as TaxGenie_DAL.CaseLaws.GetAllCaseLawsRow; txtCLcitationyear.Text = row.Year.ToString(); txtCLcitationyear.Enabled = false; txtClNumber.Text = row.CLnumber; txtClNumber.Enabled = false; int ind = row.Year.ToString().Length + row.CLnumber.Length + 7; txtCL.Text = row.TGOLCitation.Substring(ind); txtCL.Enabled = false; txtCLcasenumber.Text = row.CaseNumber; txtCLAPPELLANTParty.Text = row.APPELLANTParty; txtCLrespondentparty.Text = row.RESPONDENTParty; txtCLjudgesname.Text = row.JudgesName; txtCLdateofdec.Text = row.DateofDecision.ToString("MM-dd-yyyy"); txtCLJinFavour.SelectedValue = row.JudgementinFavourof; edtCLheadnotes.Content = row.HeadNotes; edtCLcontent.Content = row.JUDGEMENTContent; if (ddlCLlawscourt.Items.Contains(new ListItem(row.Court))) { ddlCLlawscourt.SelectedValue = row.Court; } else { ddlCLlawscourt.SelectedValue = "Other"; ddlOtherCourt.SelectedValue = row.Court; } ddlCLlawscourt_SelectedIndexChanged(ddlCLlawscourt, EventArgs.Empty); lbshowDoc.Visible = false; } if (ddlcatagory.SelectedValue.Equals("Central Excise")) { CEActsTableAdapter index = new CEActsTableAdapter(); DataTable dtActs = index.CEGetAllById(id); if (dtActs.Rows.Count > 0) { if (ddlsubcategory.SelectedValue.Equals("Acts")) { txtCActsIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); txtCActsChapterName.Text = dtActs.Rows[0]["ChapterName"].ToString(); edtCActsSections.Content = dtActs.Rows[0]["Sections"].ToString(); bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } if (ddlsubcategory.SelectedValue.Equals("Rules")) { txtCRulesIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); txtSubRulesChapterName.Text = dtActs.Rows[0]["ChapterName"].ToString(); ddlCRulesIndexGroup.SelectedValue = dtActs.Rows[0]["Headings"].ToString(); edtSubRulesSections.Content = dtActs.Rows[0]["Sections"].ToString(); bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } if (ddlsubcategory.SelectedValue.Equals("Forms")) { txtCFormsIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); txtFormsSubject.Text = dtActs.Rows[0]["Subjects"].ToString(); bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } if (ddlsubcategory.SelectedValue.Equals("Section 37B Order")) { txtCDrawbackIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } //if (ddlsubcategory.SelectedValue.Equals("Case Laws")) //{ // txtCDrawbackIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); // bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; // rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; // rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); // edtData.Content = dtActs.Rows[0]["Data"].ToString(); // lbshowDoc.Visible = !isdoc; //} } if (ddlsubcategory.SelectedValue.Equals("Tariff 2012-13")) { CentralExcise_Tariff_GetAllTableAdapter indexTariff = new CentralExcise_Tariff_GetAllTableAdapter(); DataTable dtTariff = indexTariff.SelectAllById(id); if (dtTariff.Rows.Count > 0) { ddlCtariffheading.SelectedValue = dtTariff.Rows[0]["Groups"].ToString(); ddlCtariffheading_SelectedIndexChanged(ddlCtariffheading, EventArgs.Empty); ddlCtariffsubheading.SelectedValue = dtTariff.Rows[0]["SubGroup"].ToString(); txtCtariffchapter.Text = dtTariff.Rows[0]["IndexName"].ToString(); txtCtariffChaptername.Text = dtTariff.Rows[0]["ChapterName"].ToString(); txtCtariffsubj.Text = dtTariff.Rows[0]["Subjects"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } if (ddlsubcategory.SelectedValue.Equals("Notifications")) { CECNotification_GetAllTableAdapter indexTariff = new CECNotification_GetAllTableAdapter(); DataTable dtTariff = indexTariff.SelectAllCENotificationById(id); if (dtTariff.Rows.Count > 0) { rdbCECType.SelectedValue = dtTariff.Rows[0]["GroupType"].ToString(); ddlCtariffheading_SelectedIndexChanged(ddlCtariffheading, EventArgs.Empty); txtCECYear.Text = dtTariff.Rows[0]["Year"].ToString(); txtCECFnumber.Text = dtTariff.Rows[0]["FileNumber"].ToString(); txtCECDate.Text = dtTariff.Rows[0]["Date"].ToString(); txtCECSubject.Text = dtTariff.Rows[0]["Subject"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } if (ddlsubcategory.SelectedValue.Equals("Circulars/Instructions")) { Circulars_Info_ByyearTableAdapter indexTariff = new Circulars_Info_ByyearTableAdapter(); DataTable dtTariff = indexTariff.GetCEcircularsById(id); if (dtTariff.Rows.Count > 0) { bool isCircular = dtTariff.Rows[0]["GroupType"] == "Circulars"; rdbCircularUploadType.SelectedValue = isCircular ? "Circulars" : "Instructions"; txtCircularYear.Text = dtTariff.Rows[0]["Year"].ToString(); txtCircularNumber.Text = dtTariff.Rows[0]["CircularNumber"].ToString(); txtCircularFileNumber.Text = dtTariff.Rows[0]["FileNumber"].ToString(); txtCircularDate.Text = dtTariff.Rows[0]["Date"].ToString(); txtCircularSubject.Text = dtTariff.Rows[0]["Subject"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } } if (ddlcatagory.SelectedValue.Equals("Customs")) { ActsTableAdapter index = new ActsTableAdapter(); DataTable dtActs = index.GetAllCustomsById(id); if (dtActs.Rows.Count > 0) { if (ddlsubcategory.SelectedValue.Equals("Acts")) { txtCActsIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); txtCActsChapterName.Text = dtActs.Rows[0]["ChapterName"].ToString(); edtCActsSections.Content = dtActs.Rows[0]["Sections"].ToString(); bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } if (ddlsubcategory.SelectedValue.Equals("Rules")) { txtCRulesIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); txtSubRulesChapterName.Text = dtActs.Rows[0]["ChapterName"].ToString(); ddlCRulesIndexGroup.SelectedValue = dtActs.Rows[0]["Headings"].ToString(); edtSubRulesSections.Content = dtActs.Rows[0]["Sections"].ToString(); bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } if (ddlsubcategory.SelectedValue.Equals("Forms")) { ddlCformsgroup.SelectedValue = dtActs.Rows[0]["Headings"].ToString(); ddlCformsgroup_SelectedIndexChanged(ddlCformsgroup, EventArgs.Empty); ddlCformssubgroups.SelectedValue = dtActs.Rows[0]["SubHeadings"].ToString(); txtCFormsIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); txtFormsSubject.Text = dtActs.Rows[0]["Subjects"].ToString(); bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } if (ddlsubcategory.SelectedValue.Equals("Regulations")) { txtCRegulationsIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } //if (ddlsubcategory.SelectedValue.Equals("Case Laws")) //{ // txtCDrawbackIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); // bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; // rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; // rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); // edtData.Content = dtActs.Rows[0]["Data"].ToString(); // lbshowDoc.Visible = !isdoc; //} if (ddlsubcategory.SelectedValue.Equals("Drawback Schedule")) { txtCDrawbackIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } if (ddlsubcategory.SelectedValue.Equals("SEZ")) { txtCSEZNotficationNo.Text = dtActs.Rows[0]["IndexName"].ToString(); txtCSEZSubject.Text = dtActs.Rows[0]["Subjects"].ToString(); bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } if (ddlsubcategory.SelectedValue.Equals("Tariff 2012-13")) { Custom_Tariff_GetAllTableAdapter indexTariff = new Custom_Tariff_GetAllTableAdapter(); DataTable dtTariff = indexTariff.SelectCustomTariffById(id); if (dtTariff.Rows.Count > 0) { ddlCtariffheading.SelectedValue = dtTariff.Rows[0]["Groups"].ToString(); ddlCtariffheading_SelectedIndexChanged(ddlCtariffheading, EventArgs.Empty); ddlCtariffsubheading.SelectedValue = dtTariff.Rows[0]["SubGroup"].ToString(); txtCtariffchapter.Text = dtTariff.Rows[0]["IndexName"].ToString(); txtCtariffChaptername.Text = dtTariff.Rows[0]["ChapterName"].ToString(); txtCtariffsubj.Text = dtTariff.Rows[0]["Subjects"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } if (ddlsubcategory.SelectedValue.Equals("Notifications")) { CECNotification_GetAllTableAdapter indexTariff = new CECNotification_GetAllTableAdapter(); DataTable dtTariff = indexTariff.SelectAllCENotificationById(id); if (dtTariff.Rows.Count > 0) { rdbCECType.SelectedValue = dtTariff.Rows[0]["GroupType"].ToString(); ddlCtariffheading_SelectedIndexChanged(ddlCtariffheading, EventArgs.Empty); txtCECYear.Text = dtTariff.Rows[0]["Year"].ToString(); txtCECFnumber.Text = dtTariff.Rows[0]["FileNumber"].ToString(); txtCECDate.Text = dtTariff.Rows[0]["Date"].ToString(); txtCECSubject.Text = dtTariff.Rows[0]["Subject"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } if (ddlsubcategory.SelectedValue.Equals("Circulars/Instructions")) { Circulars_Info_ByyearTableAdapter indexTariff = new Circulars_Info_ByyearTableAdapter(); DataTable dtTariff = indexTariff.GetCEcircularsById(id); if (dtTariff.Rows.Count > 0) { bool isCircular = dtTariff.Rows[0]["GroupType"].ToString().Equals("Circulars"); rdbCircularUploadType.SelectedValue = isCircular ? "Circulars" : "Instructions"; txtCircularYear.Text = dtTariff.Rows[0]["Year"].ToString(); txtCircularNumber.Text = dtTariff.Rows[0]["CircularNumber"].ToString(); txtCircularFileNumber.Text = dtTariff.Rows[0]["FileNumber"].ToString(); txtCircularDate.Text = dtTariff.Rows[0]["Date"].ToString(); txtCircularSubject.Text = dtTariff.Rows[0]["Subject"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } } if (ddlcatagory.SelectedValue.Equals("Service Tax")) { ServiceTax_GetAllTableAdapter index = new ServiceTax_GetAllTableAdapter(); DataTable dtActs = index.SelectAllSTById(id); if (dtActs.Rows.Count > 0) { if (ddlsubcategory.SelectedValue.Equals("Act 1994") || ddlsubcategory.SelectedValue.Equals("ST Rules")) { txtCActsIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); txtCActsChapterName.Text = dtActs.Rows[0]["ChapterName"].ToString(); edtCActsSections.Content = dtActs.Rows[0]["Sections"].ToString(); edtCActsSections.Visible = false; bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } if (ddlsubcategory.SelectedValue.Equals("Forms and Registers")) { ddlCformsgroup.SelectedValue = dtActs.Rows[0]["Headings"].ToString(); ddlCformsgroup_SelectedIndexChanged(ddlCformsgroup, EventArgs.Empty); ddlCformssubgroups.SelectedValue = dtActs.Rows[0]["SubHeadings"].ToString(); txtCFormsIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); txtFormsSubject.Text = dtActs.Rows[0]["Subjects"].ToString(); bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } if (ddlsubcategory.SelectedValue.Equals("Accounting Codes for new services")) { txtCActsIndex.Text = dtActs.Rows[0]["IndexName"].ToString(); txtCActsChapterName.Text = dtActs.Rows[0]["ChapterName"].ToString(); edtCActsSections.Content = dtActs.Rows[0]["Sections"].ToString(); edtCActsSections.Visible = false; bool isdoc = dtActs.Rows[0]["Data"] != null && dtActs.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtActs.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } //if (ddlsubcategory.SelectedValue.Equals("Case Laws")) //{ // STCaselaws_GetAllTableAdapter indexTariff = new STCaselaws_GetAllTableAdapter(); // DataTable dtTariff = indexTariff.SelectSTCaseLawsById(id); // if (dtTariff.Rows.Count > 0) // { // txtSTCaselaws.Text = dtTariff.Rows[0]["IndexName"].ToString(); // bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; // rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; // rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); // edtData.Content = dtTariff.Rows[0]["Data"].ToString(); // lbshowDoc.Visible = !isdoc; // } //} if (ddlsubcategory.SelectedValue.Equals("Notifications")) { STN_GetAllTableAdapter indexTariff = new STN_GetAllTableAdapter(); DataTable dtTariff = indexTariff.GetAllSTNById(id); if (dtTariff.Rows.Count > 0) { txtSTNYear.Text = dtTariff.Rows[0]["Year"].ToString(); txtSTNFNumber.Text = dtTariff.Rows[0]["FileNumber"].ToString(); txtSTNDate.Text = dtTariff.Rows[0]["Date"].ToString(); txtSTNSubject.Text = dtTariff.Rows[0]["Subject"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } if (ddlsubcategory.SelectedValue.Equals("Circulars/Instructions")) { Circulars_Info_ByyearTableAdapter indexTariff = new Circulars_Info_ByyearTableAdapter(); DataTable dtTariff = indexTariff.GetCEcircularsById(id); if (dtTariff.Rows.Count > 0) { bool isCircular = dtTariff.Rows[0]["GroupType"].ToString().Equals("Circulars"); rdbCircularUploadType.SelectedValue = isCircular ? "Circulars" : "Instructions"; txtCircularYear.Text = dtTariff.Rows[0]["Year"].ToString(); txtCircularNumber.Text = dtTariff.Rows[0]["CircularNumber"].ToString(); txtCircularFileNumber.Text = dtTariff.Rows[0]["FileNumber"].ToString(); txtCircularDate.Text = dtTariff.Rows[0]["Date"].ToString(); txtCircularSubject.Text = dtTariff.Rows[0]["Subject"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } } if (ddlcatagory.SelectedValue.Equals("Income Tax")) { if (ddlsubcategory.SelectedValue.Equals("Acts")) { IncomeTaxActs_SelectAllTableAdapter indexTariff = new IncomeTaxActs_SelectAllTableAdapter(); DataTable dtTariff = indexTariff.GetITActsById(id); if (dtTariff.Rows.Count > 0) { ddlITActType.SelectedValue = dtTariff.Rows[0]["SubCategory"].ToString(); ddlITActType_SelectedIndexChanged(ddlITActType, EventArgs.Empty); if (ddlITActType.SelectedValue.Equals("Income Tax Act") || ddlITActType.SelectedValue.Equals("Wealth Tax Act") || ddlITActType.SelectedValue.Equals("Expenditure Tax Act")) { txtSectionNo.Text = dtTariff.Rows[0]["SectionNo"].ToString(); txtSectionName.Text = dtTariff.Rows[0]["IndexName"].ToString(); } else { ddlGroup.SelectedValue = dtTariff.Rows[0]["Groups"].ToString(); txtHeadings.Text = dtTariff.Rows[0]["IndexName"].ToString(); } bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } if (ddlsubcategory.SelectedValue.Equals("Rules")) { IncomeTaxRules_SelectAllTableAdapter indexTariff = new IncomeTaxRules_SelectAllTableAdapter(); DataTable dtTariff = indexTariff.GetITRulesById(id); if (dtTariff.Rows.Count > 0) { ddlITActType.SelectedValue = dtTariff.Rows[0]["SubCategory"].ToString(); ddlITActType_SelectedIndexChanged(ddlITActType, EventArgs.Empty); if (ddlITActType.SelectedValue.Equals("Income Tax Rules")) { txtSectionNo.Text = dtTariff.Rows[0]["SectionNo"].ToString(); txtSectionName.Text = dtTariff.Rows[0]["IndexName"].ToString(); } else { txtHeadings.Text = dtTariff.Rows[0]["IndexName"].ToString(); } bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } if (ddlsubcategory.SelectedValue.Equals("Circulars") || ddlsubcategory.SelectedValue.Equals("Notifications")) { IncomeTaxCircularsNotification_SelectAllTableAdapter indexTariff = new IncomeTaxCircularsNotification_SelectAllTableAdapter(); DataTable dtTariff = indexTariff.GetITCNById(id); if (dtTariff.Rows.Count > 0) { txtITCircularNo.Text = dtTariff.Rows[0]["IndexName"].ToString(); txtITCircularDate.Text = dtTariff.Rows[0]["datetime1"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } } if (ddlcatagory.SelectedValue.Equals("DGFT")) { if (ddlsubcategory.SelectedValue.Equals("FTP")) { DGFT_GetAllTableAdapter indexTariff = new DGFT_GetAllTableAdapter(); DataTable dtTariff = indexTariff.GetDGFTById(id); if (dtTariff.Rows.Count > 0) { txtDGFTFTPchaptername.Text = dtTariff.Rows[0]["ChapterName"].ToString(); txtpnlDGFTFTPindex.Text = dtTariff.Rows[0]["IndexName"].ToString(); txtDGFTFTPsubject.Text = dtTariff.Rows[0]["Sections"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } if (ddlsubcategory.SelectedValue.Equals("FTDR Notifications")) { DGFT_GetAllTableAdapter indexTariff = new DGFT_GetAllTableAdapter(); DataTable dtTariff = indexTariff.GetDGFTById(id); if (dtTariff.Rows.Count > 0) { txtDGFTFTDRindex.Text = dtTariff.Rows[0]["IndexName"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } if (ddlsubcategory.SelectedValue.Equals("public notices")) { DGFTpublicnotices_GETALLTableAdapter indexTariff = new DGFTpublicnotices_GETALLTableAdapter(); DataTable dtTariff = indexTariff.GetAllDgftPNById(id); if (dtTariff.Rows.Count > 0) { txtDGFTpublicnoticeindex.Text = dtTariff.Rows[0]["IndexName"].ToString(); txtDGFTpublicnoticenum.Text = dtTariff.Rows[0]["NoticeNumber"].ToString(); txtDGFTpublicnoticedate.Text = dtTariff.Rows[0]["Date"].ToString(); txtDGFTpublicnoticesubject.Text = dtTariff.Rows[0]["Subject"].ToString(); bool isdoc = dtTariff.Rows[0]["Data"] != null && dtTariff.Rows[0]["Data"].ToString().Length > 0; rdbUploadType.SelectedValue = isdoc ? "Paste the Document" : "Upload the Document"; rblUploadType_SelectedIndexChanged(rdbUploadType, EventArgs.Empty); edtData.Content = dtTariff.Rows[0]["Data"].ToString(); lbshowDoc.Visible = !isdoc; } } } } } }
protected void lbshowDoc_Click(object sender, EventArgs e) { int? id = Int32.Parse(hdnId.Value); if (ddlcatagory.SelectedValue.Equals("Central Excise")) { if (ddlsubcategory.SelectedValue.Equals("Tariff 2012-13")) { CentralExcise_Tariff_GetAllTableAdapter indexTariff = new CentralExcise_Tariff_GetAllTableAdapter(); DataTable dataTariff = indexTariff.SelectAllById(id); if (dataTariff.Rows.Count > 0) { byte[] b = ((byte[])dataTariff.Rows[0]["Document"]); Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } else if (ddlsubcategory.SelectedValue.Equals("Circulars/Instructions")) { Circulars_Info_ByyearTableAdapter index = new Circulars_Info_ByyearTableAdapter(); DataTable dtActs = index.GetCEcircularsById(id); if (dtActs.Rows.Count > 0) { byte[] b = ((byte[])dtActs.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } else { CEActsTableAdapter index = new CEActsTableAdapter(); DataTable dtActs = index.CEGetAllById(id); if (dtActs.Rows.Count > 0) { byte[] b = ((byte[])dtActs.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } } if (ddlcatagory.SelectedValue.Equals("Customs")) { if (ddlsubcategory.SelectedValue.Equals("Tariff 2012-13")) { Custom_Tariff_GetAllTableAdapter indexTariff = new Custom_Tariff_GetAllTableAdapter(); DataTable dataTariff = indexTariff.SelectCustomTariffById(id); if (dataTariff.Rows.Count > 0) { byte[] b = ((byte[])dataTariff.Rows[0]["Document"]); Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } else if (ddlsubcategory.SelectedValue.Equals("Circulars/Instructions")) { Circulars_Info_ByyearTableAdapter index = new Circulars_Info_ByyearTableAdapter(); DataTable dtActs = index.GetCEcircularsById(id); if (dtActs.Rows.Count > 0) { byte[] b = ((byte[])dtActs.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } else { ActsTableAdapter index = new ActsTableAdapter(); DataTable dtActs = index.GetAllCustomsById(id); if (dtActs.Rows.Count > 0) { byte[] b = ((byte[])dtActs.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } } if (ddlcatagory.SelectedValue.Equals("Service Tax")) { if (ddlsubcategory.SelectedValue.Equals("Case Laws")) { STCaselaws_GetAllTableAdapter indexTariff = new STCaselaws_GetAllTableAdapter(); DataTable dataTariff = indexTariff.SelectSTCaseLawsById(id); if (dataTariff.Rows.Count > 0) { byte[] b = ((byte[])dataTariff.Rows[0]["Document"]); Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } else if (ddlsubcategory.SelectedValue.Equals("Notifications")) { STN_GetAllTableAdapter index = new STN_GetAllTableAdapter(); DataTable dtActs = index.GetAllSTNById(id); if (dtActs.Rows.Count > 0) { byte[] b = ((byte[])dtActs.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } else if (ddlsubcategory.SelectedValue.Equals("Circulars/Instructions")) { Circulars_Info_ByyearTableAdapter index = new Circulars_Info_ByyearTableAdapter(); DataTable dtActs = index.GetCEcircularsById(id); if (dtActs.Rows.Count > 0) { byte[] b = ((byte[])dtActs.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } else { ServiceTax_GetAllTableAdapter index = new ServiceTax_GetAllTableAdapter(); DataTable dtActs = index.SelectAllSTById(id); if (dtActs.Rows.Count > 0) { byte[] b = ((byte[])dtActs.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } } if (ddlcatagory.SelectedValue.Equals("Income Tax")) { if (ddlsubcategory.SelectedValue.Equals("Acts")) { IncomeTaxActs_SelectAllTableAdapter indexTariff = new IncomeTaxActs_SelectAllTableAdapter(); DataTable dataTariff = indexTariff.GetITActsById(id); if (dataTariff.Rows.Count > 0) { byte[] b = ((byte[])dataTariff.Rows[0]["Document"]); Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } else if (ddlsubcategory.SelectedValue.Equals("Rules")) { IncomeTaxRules_SelectAllTableAdapter index = new IncomeTaxRules_SelectAllTableAdapter(); DataTable dtActs = index.GetITRulesById(id); if (dtActs.Rows.Count > 0) { byte[] b = ((byte[])dtActs.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } else { IncomeTaxCircularsNotification_SelectAllTableAdapter index = new IncomeTaxCircularsNotification_SelectAllTableAdapter(); DataTable dtActs = index.GetITCNById(id); if (dtActs.Rows.Count > 0) { byte[] b = ((byte[])dtActs.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } } if (ddlcatagory.SelectedValue.Equals("DGFT")) { if (ddlsubcategory.SelectedValue.Equals("public notices")) { DGFTpublicnotices_GETALLTableAdapter indexTariff = new DGFTpublicnotices_GETALLTableAdapter(); DataTable dataTariff = indexTariff.GetAllDgftPNById(id); if (dataTariff.Rows.Count > 0) { byte[] b = ((byte[])dataTariff.Rows[0]["Document"]); Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } else { DGFT_GetAllTableAdapter index = new DGFT_GetAllTableAdapter(); DataTable dtActs = index.GetDGFTById(id); if (dtActs.Rows.Count > 0) { byte[] b = ((byte[])dtActs.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } } } }
protected void Page_Load(object sender, EventArgs e) { string category = Convert.ToString(Request.QueryString["cat"]); if (category == "Central") { category = "Central Excise"; subcategeory = "Case Laws"; } else if (category == "Service") { category = "Service Tax"; subcategeory = "Case Laws"; } else { subcategeory = Request.QueryString["subcat"]; } string indexName = Request.QueryString["name"]; string chapter = Request.QueryString["chaptername"]; string citation = Request.QueryString["citation"]; cNumber = Convert.ToString(Request.QueryString["cnums"]); fNumber = Convert.ToString(Request.QueryString["fnums"]); year = Convert.ToString(Request.QueryString["years"]); string notification = Request.QueryString["notificationname"]; string notificationnum = Convert.ToString(Request.QueryString["CECNnum"]); string STNnotificationnum = Convert.ToString(Request.QueryString["STNnum"]); #region Circulars/Instructions if (subcategeory == "Circulars/Instructions") { if (cNumber != "") { Instructions_Data_ByCnumberTableAdapter getDatByCnumber = new Instructions_Data_ByCnumberTableAdapter(); DataTable dtDatByCnumber = getDatByCnumber.GetDatabyCnumber(cNumber, category, year); if (dtDatByCnumber.Rows.Count > 0) { ltl.Text = Convert.ToString(dtDatByCnumber.Rows[0]["Data"]); } } if (fNumber != "") { Instructions1_Data_ByCnumberTableAdapter getDataByFnumber = new Instructions1_Data_ByCnumberTableAdapter(); DataTable dtDataByFnumber = getDataByFnumber.InstructionsData(fNumber, category, year); if (dtDataByFnumber.Rows.Count > 0) { ltl.Text = Convert.ToString(dtDataByFnumber.Rows[0]["Data"]); } } } #endregion #region Customs Tariff else if (category == "Customs" && subcategeory == "Tariff 2012-13") { if (indexName == null && chapter != "") { Custom_Tariff_DataByChapteNameTableAdapter getDataByChapteName = new Custom_Tariff_DataByChapteNameTableAdapter(); DataTable dtDataByChapteName = getDataByChapteName.GetCTDataByChapterName(chapter); if (dtDataByChapteName.Rows.Count > 0) { string tchaptername = Convert.ToString(dtDataByChapteName.Rows[0]["ChapterName"].ToString()); if (tchaptername != "") { string tdata = Convert.ToString(dtDataByChapteName.Rows[0]["Data"].ToString()); if (tdata != "") { ltl.Text = Convert.ToString(dtDataByChapteName.Rows[0]["Data"]); } else { byte[] b = ((byte[])dtDataByChapteName.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); Response.Write("<script>window.open('Page.html','_blank')</script>"); } } } } else { Custom_Tariff_DataByIndexNameTableAdapter getDataByIndexName = new Custom_Tariff_DataByIndexNameTableAdapter(); DataTable dtDataByIndexName = getDataByIndexName.GetCTDataByIndexName(indexName); string tdata = Convert.ToString(dtDataByIndexName.Rows[0]["Data"].ToString()); if (tdata != "") { ltl.Text = Convert.ToString(dtDataByIndexName.Rows[0]["Data"]); } else { byte[] b = ((byte[])dtDataByIndexName.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); Response.Write("<script>window.open('Page.html','_blank')</script>"); } } } #endregion #region Central Excise Tariff else if (category == "Central Excise" && subcategeory == "Tariff 2012-13") { if (indexName == null && chapter != "") { CE_Tariff_DataByChapteNameTableAdapter getDataByChapteName = new CE_Tariff_DataByChapteNameTableAdapter(); DataTable dtDataByChapteName = getDataByChapteName.CE_Tariff_DataByChapter(chapter); if (dtDataByChapteName.Rows.Count > 0) { string tchaptername = Convert.ToString(dtDataByChapteName.Rows[0]["ChapterName"].ToString()); if (tchaptername != "") { string tdata = Convert.ToString(dtDataByChapteName.Rows[0]["Data"].ToString()); if (tdata != "") { ltl.Text = Convert.ToString(dtDataByChapteName.Rows[0]["Data"]); } else { byte[] b = ((byte[])dtDataByChapteName.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); Response.Write("<script>window.open('Page.html','_blank')</script>"); } } } } else { CentralExcise_Tariff_GetAllTableAdapter getDataByIndexName = new CentralExcise_Tariff_GetAllTableAdapter(); DataTable dtDataByIndexName = getDataByIndexName.CE_Tariff_DataByIndex(indexName); string tdata = Convert.ToString(dtDataByIndexName.Rows[0]["Data"].ToString()); if (tdata != "") { ltl.Text = Convert.ToString(dtDataByIndexName.Rows[0]["Data"]); } else { byte[] b = ((byte[])dtDataByIndexName.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); Response.Write("<script>window.open('Page.html','_blank')</script>"); } } } #endregion #region Service Tax CaseLaws //else if (category == "Service Tax" && subcategeory == "Case Laws") //{ // STCaselaws_GetAllTableAdapter getSTCaselawsDataByindex = new STCaselaws_GetAllTableAdapter(); // DataTable dtSTCaselawsDataByindex = getSTCaselawsDataByindex.GetDataByIndexName(indexName); // string stcl = Convert.ToString(dtSTCaselawsDataByindex.Rows[0]["Data"]); // if (stcl != null) // { // ltl.Text = Convert.ToString(dtSTCaselawsDataByindex.Rows[0]["Data"]); // } // else // { // byte[] b = ((byte[])dtSTCaselawsDataByindex.Rows[0]["Document"]); // //Collect Bytes from database and write in Webpage // Response.ContentType = "application/pdf"; // Response.BinaryWrite(b); // Response.Write("<script>window.open('Page.html','_blank')</script>"); // } //} #endregion #region STLibraries else if (category == "Library" && subcategeory == "Libraries") { string path = HttpContext.Current.Server.MapPath("faq-29sept11.pdf"); System.Net.WebClient client = new System.Net.WebClient(); Byte[] buffer = client.DownloadData(path); if (buffer != null) { Response.ContentType = "application/pdf"; Response.AddHeader("content-length", buffer.Length.ToString()); Response.TransmitFile(path); //Response.BinaryWrite(buffer); } } #endregion #region STTaxation else if (category == "Service Tax" && subcategeory == "Taxation of Services: An Educational Guide") { string path = HttpContext.Current.Server.MapPath("st-edu-guide.pdf"); System.Net.WebClient client = new System.Net.WebClient(); Byte[] buffer = client.DownloadData(path); if (buffer != null) { Response.ContentType = "application/pdf"; Response.AddHeader("content-length", buffer.Length.ToString()); Response.TransmitFile(path); } } #endregion #region CEManual else if (category == "Service Tax" && subcategeory == "CBEC Manual") { string path = HttpContext.Current.Server.MapPath("cx-manual.pdf"); System.Net.WebClient client = new System.Net.WebClient(); Byte[] buffer = client.DownloadData(path); if (buffer != null) { Response.ContentType = "application/pdf"; Response.AddHeader("content-length", buffer.Length.ToString()); Response.TransmitFile(path); } } #endregion #region CECNotifications else if (subcategeory == "Notifications" & (category == "Customs" || category == "Central Excise")) { DataTable dtcectdata = null; CECNotification_GetAllTableAdapter cectdata = new CECNotification_GetAllTableAdapter(); switch (notification) { case "Tariff": dtcectdata = cectdata.CEC_notificatondata_ByTnum(notificationnum, category, year); break; case "Non-Tariff": dtcectdata = cectdata.CEC_notificatondata_ByNTnum(notificationnum, category, year); break; case "Safeguards": dtcectdata = cectdata.CEC_notificatondata_BySnum(notificationnum, category, year); break; case "Anti Dumping Duty": dtcectdata = cectdata.CEC_notificationdata_ByADDNum(notificationnum, category, year); break; case "Others": dtcectdata = cectdata.CEC_notificationdata_ByOthersnum(notificationnum, category, year); break; } string stcl = Convert.ToString(dtcectdata.Rows[0]["Data"]); if (stcl != null) { ltl.Text = Convert.ToString(dtcectdata.Rows[0]["Data"]); } else { byte[] b = ((byte[])dtcectdata.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); Response.Write("<script>window.open('Page.html','_blank')</script>"); } } #endregion #region STNotifications else if (category == "Service Tax" && subcategeory == "Notifications") { STN_GetAllTableAdapter stnshow = new STN_GetAllTableAdapter(); DataTable dtstnshow = stnshow.STN_DataByFnum(STNnotificationnum, subcategeory, year); string stcl = Convert.ToString(dtstnshow.Rows[0]["Data"]); if (stcl != null) { ltl.Text = Convert.ToString(dtstnshow.Rows[0]["Data"]); } else { byte[] b = ((byte[])dtstnshow.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); Response.Write("<script>window.open('Page.html','_blank')</script>"); } } #endregion #region DGFT else if (category == "DGFT" & subcategeory == "public notices") { DGFTpublicnotices_GETALLTableAdapter DGFTNoticenum = new DGFTpublicnotices_GETALLTableAdapter(); DataTable dtChapterName = DGFTNoticenum.DGFT_publicnoticdata(indexName, chapter); string stcl = Convert.ToString(dtChapterName.Rows[0]["Data"]); if (stcl != null) { ltl.Text = Convert.ToString(dtChapterName.Rows[0]["Data"]); } else { byte[] b = ((byte[])dtChapterName.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); Response.Write("<script>window.open('Page.html','_blank')</script>"); } } else if (category == "DGFT" & subcategeory == "FTDR Notifications") { DGFT_FTDR_Notifications_GetAllTableAdapter DGFTNoticenum = new DGFT_FTDR_Notifications_GetAllTableAdapter(); DataTable dtChapterName = DGFTNoticenum.DGFT_FTDRnotic_Data(indexName, chapter); string stcl = Convert.ToString(dtChapterName.Rows[0]["Data"]); if (stcl != null) { ltl.Text = Convert.ToString(dtChapterName.Rows[0]["Data"]); } else { byte[] b = ((byte[])dtChapterName.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); Response.Write("<script>window.open('Page.html','_blank')</script>"); } } #endregion #region Library else if (category == "Library") { Library_SelectAllTableAdapter LibraryData = new Library_SelectAllTableAdapter(); //Library_RSRules_SelectAllTableAdapter CEActsChapter = new Library_RSRules_SelectAllTableAdapter(); DataTable dtChapterName = LibraryData.Library_Data_Select(subcategeory, indexName); string stcl = Convert.ToString(dtChapterName.Rows[0]["Data"]); if (stcl != null & stcl !="") { ltl.Text = Convert.ToString(dtChapterName.Rows[0]["Data"]); } else { byte[] b = ((byte[])dtChapterName.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); Response.Write("<script>window.open('Page.html','_blank')</script>"); } } #endregion #region Caselaws else if (subcategeory == "Case Laws" || subcategeory == "Case") { GetAllCaseLawsTableAdapter getdatabycitation = new GetAllCaseLawsTableAdapter(); DataTable dtgetdatabycitation = getdatabycitation.GetDataByCitation(category, citation); if (dtgetdatabycitation.Rows.Count > 0) { string strCourt = ""; if (dtgetdatabycitation.Rows[0]["Court"].ToString().Contains("CESTAT")) { strCourt="CUSTOMS, EXCISE AND SERVICE TAX APPELLATE TRIBUNAL<br/>"+dtgetdatabycitation.Rows[0]["Bench"]; } else { strCourt=dtgetdatabycitation.Rows[0]["Court"]+" "+dtgetdatabycitation.Rows[0]["Bench"]; } LtlCaselaws.Text += "<table class='citCase' width='100%' align='center'><tr><th width='100%' align='center'>" + citation.ToUpper() + "</th></tr><tr>"; LtlCaselaws.Text += "<td width='100%' align='center'>" + strCourt.ToUpper() + "</td></tr><tr>"; LtlCaselaws.Text += "<td align='center'>" + dtgetdatabycitation.Rows[0]["CaseNumber"] + "</td></tr><tr>"; LtlCaselaws.Text += "<td align='center' class='parties'>"; LtlCaselaws.Text += dtgetdatabycitation.Rows[0]["APPELLANTParty"].ToString().ToUpper() + "<br/>Vs.<br/>"; LtlCaselaws.Text += dtgetdatabycitation.Rows[0]["RESPONDENTParty"].ToString().ToUpper() + "</td></tr><tr><td align='left'>"; LtlCaselaws.Text += dtgetdatabycitation.Rows[0]["JudgesName"] + "</td></tr><tr><td align='right'>"; LtlCaselaws.Text +="Dated: " +((DateTime)dtgetdatabycitation.Rows[0]["DateofDecision"]).ToString("MMMM dd, yyyy") + "</td></tr><tr><td style='text-align:left' align='justify'>"; LtlCaselaws.Text += dtgetdatabycitation.Rows[0]["HeadNotes"] + "</td></tr><tr><td> </td></tr><tr><td></td></tr>"; LtlCaselaws.Text += "<tr><td style='font-weight:normal' align='justify'>"; LtlCaselaws.Text += dtgetdatabycitation.Rows[0]["JUDGEMENTContent"] + "</td></tr>"; LtlCaselaws.Text += "<tr><td style='padding:45px;font-style:italic;font-weight:normal;text-align:left' align='justify'><font face='Verdana, Arial, Helvetica, sans-serif' color='#666666' size='1'>(<b style='font-weight:bold'>DISCLAIMER</b>: Though all efforts have been made to reproduce the order correctly but the access and circulation is subject to the condition that TaxgenieOnline are not responsible/liable for any loss or damage caused to anyone due to any mistake/error/omissions.)</font></td></tr>"; LtlCaselaws.Text += "</table>"; } } #endregion else { DataTable dtChapterName = new DataTable(); if (category == "Customs") { ActsTableAdapter chapterName = new ActsTableAdapter(); dtChapterName = chapterName.Data_Select(subcategeory, indexName); } else if (category == "Central Excise") { CEActsTableAdapter CEActsChapter = new CEActsTableAdapter(); dtChapterName = CEActsChapter.CEData(subcategeory, indexName); } else if (category == "Service Tax") { ServiceTax_GetAll1TableAdapter STchaptername = new ServiceTax_GetAll1TableAdapter(); dtChapterName = STchaptername.GetSTData(subcategeory, indexName); } else if (category == "DGFT" & subcategeory == "FTP") { DGFT_GetAllTableAdapter FTPchapterName = new DGFT_GetAllTableAdapter(); dtChapterName = FTPchapterName.DGFT_FTP_Data_select(subcategeory, indexName); } else if (category == "Income Tax" & (subcategeory == "Income Tax Act" || subcategeory == "Wealth Tax Act" || subcategeory == "Expenditure Tax Act" || subcategeory == "Finance Act")) { IncomeTaxActs_SelectAllTableAdapter itActsData = new IncomeTaxActs_SelectAllTableAdapter(); dtChapterName = itActsData.GetDataByIndex(subcategeory, indexName); } else if (category == "Income Tax" & (subcategeory == "Income Tax Rules" || subcategeory == "Other Direct Tax Rules")) { IncomeTaxRules_SelectAllTableAdapter itActsData = new IncomeTaxRules_SelectAllTableAdapter(); dtChapterName = itActsData.GetDataByIndex(subcategeory, indexName); } else if (category == "Income Tax" & (subcategeory == "Circulars" || subcategeory == "Notifications")) { IncomeTaxCircularsNotification_SelectAllTableAdapter itActsData = new IncomeTaxCircularsNotification_SelectAllTableAdapter(); dtChapterName = itActsData.GetDataByIndex(subcategeory, indexName); } if (dtChapterName.Rows.Count > 0) { string aChapterName = Convert.ToString(dtChapterName.Rows[0]["ChapterName"].ToString()); string aSections = Convert.ToString(dtChapterName.Rows[0]["Sections"].ToString()); string adata = Convert.ToString(dtChapterName.Rows[0]["Data"].ToString()); string aDocumenet = Convert.ToString(dtChapterName.Rows[0]["Document"].ToString()); if (aChapterName == "" & aSections == "" & aDocumenet == "") { ltl.Text = Convert.ToString(dtChapterName.Rows[0]["Data"]); } else if (aChapterName == "" & aSections == "" & adata == "") { byte[] b = ((byte[])dtChapterName.Rows[0]["Document"]); //Collect Bytes from database and write in Webpage Response.ContentType = "application/pdf"; Response.BinaryWrite(b); } else { // ltl.Text = "<table><tr><td style='width=500px'>"; foreach (DataRow drChapterName in dtChapterName.Rows) { string aChapter = drChapterName["ChapterName"].ToString().Trim(); if (chapter.Trim().Equals(aChapter)) { ltl.Text = Convert.ToString(drChapterName["Data"]); } } } } } }