//internal DataTable LoadOrgType(ProfileCreationModel objPCModel) //{ // try // { // ClsCon.cmd = new SqlCommand(); // ClsCon.cmd.CommandType = CommandType.StoredProcedure; // ClsCon.cmd.CommandText = "SPMasters"; // ClsCon.cmd.Parameters.AddWithValue("@DataInd", objPCModel.Ind); // con = ClsCon.SqlConn(); // ClsCon.cmd.Connection = con; // dtProfileCreation = new DataTable(); // ClsCon.da = new SqlDataAdapter(ClsCon.cmd); // ClsCon.da.Fill(dtProfileCreation); // dtProfileCreation.TableName = "success"; // } // catch (Exception) // { // dtProfileCreation = new DataTable(); // dtProfileCreation.TableName = "error"; // return dtProfileCreation; // } // finally // { // con.Close(); // con.Dispose(); // ClsCon.da.Dispose(); // ClsCon.cmd.Dispose(); // } // return dtProfileCreation; //} //internal DataTable LoadBusinessNature(ProfileCreationModel objPCModel) //{ // try // { // ClsCon.cmd = new SqlCommand(); // ClsCon.cmd.CommandType = CommandType.StoredProcedure; // ClsCon.cmd.CommandText = "SPMasters"; // ClsCon.cmd.Parameters.AddWithValue("@DataInd", objPCModel.Ind); // con = ClsCon.SqlConn(); // ClsCon.cmd.Connection = con; // dtProfileCreation = new DataTable(); // ClsCon.da = new SqlDataAdapter(ClsCon.cmd); // ClsCon.da.Fill(dtProfileCreation); // dtProfileCreation.TableName = "success"; // } // catch (Exception) // { // dtProfileCreation = new DataTable(); // dtProfileCreation.TableName = "error"; // return dtProfileCreation; // } // finally // { // con.Close(); // con.Dispose(); // ClsCon.da.Dispose(); // ClsCon.cmd.Dispose(); // } // return dtProfileCreation; //} //internal DataTable LoadBusinessType(ProfileCreationModel objPCModel) //{ // try // { // ClsCon.cmd = new SqlCommand(); // ClsCon.cmd.CommandType = CommandType.StoredProcedure; // ClsCon.cmd.CommandText = "SPMasters"; // ClsCon.cmd.Parameters.AddWithValue("@DataInd", objPCModel.Ind); // con = ClsCon.SqlConn(); // ClsCon.cmd.Connection = con; // dtProfileCreation = new DataTable(); // ClsCon.da = new SqlDataAdapter(ClsCon.cmd); // ClsCon.da.Fill(dtProfileCreation); // dtProfileCreation.TableName = "success"; // } // catch (Exception) // { // dtProfileCreation = new DataTable(); // dtProfileCreation.TableName = "error"; // return dtProfileCreation; // } // finally // { // con.Close(); // con.Dispose(); // ClsCon.da.Dispose(); // ClsCon.cmd.Dispose(); // } // return dtProfileCreation; //} //internal DataTable LoadCopyType(ProfileCreationModel objPCModel) //{ // try // { // ClsCon.cmd = new SqlCommand(); // ClsCon.cmd.CommandType = CommandType.StoredProcedure; // ClsCon.cmd.CommandText = "SPMasters"; // ClsCon.cmd.Parameters.AddWithValue("@DataInd", objPCModel.Ind); // con = ClsCon.SqlConn(); // ClsCon.cmd.Connection = con; // dtProfileCreation = new DataTable(); // ClsCon.da = new SqlDataAdapter(ClsCon.cmd); // ClsCon.da.Fill(dtProfileCreation); // dtProfileCreation.TableName = "success"; // } // catch (Exception) // { // dtProfileCreation = new DataTable(); // dtProfileCreation.TableName = "error"; // return dtProfileCreation; // } // finally // { // con.Close(); // con.Dispose(); // ClsCon.da.Dispose(); // ClsCon.cmd.Dispose(); // } // return dtProfileCreation; //} //internal DataTable LoadState(ProfileCreationModel objPCModel) //{ // try // { // ClsCon.cmd = new SqlCommand(); // ClsCon.cmd.CommandType = CommandType.StoredProcedure; // ClsCon.cmd.CommandText = "SPMasters"; // ClsCon.cmd.Parameters.AddWithValue("@DataInd", objPCModel.Ind); // con = ClsCon.SqlConn(); // ClsCon.cmd.Connection = con; // dtProfileCreation = new DataTable(); // ClsCon.da = new SqlDataAdapter(ClsCon.cmd); // ClsCon.da.Fill(dtProfileCreation); // dtProfileCreation.TableName = "success"; // } // catch (Exception) // { // dtProfileCreation = new DataTable(); // dtProfileCreation.TableName = "error"; // return dtProfileCreation; // } // finally // { // con.Close(); // con.Dispose(); // ClsCon.da.Dispose(); // ClsCon.cmd.Dispose(); // } // return dtProfileCreation; //} //internal DataTable LoadReportFormats(ProfileCreationModel objPCModel) //{ // try // { // ClsCon.cmd = new SqlCommand(); // ClsCon.cmd.CommandType = CommandType.StoredProcedure; // ClsCon.cmd.CommandText = "SPClientProfile"; // ClsCon.cmd.Parameters.AddWithValue("@Ind", objPCModel.Ind); // con = ClsCon.SqlConn(); // ClsCon.cmd.Connection = con; // dtProfileCreation = new DataTable(); // ClsCon.da = new SqlDataAdapter(ClsCon.cmd); // ClsCon.da.Fill(dtProfileCreation); // dtProfileCreation.TableName = "success"; // } // catch (Exception) // { // dtProfileCreation = new DataTable(); // dtProfileCreation.TableName = "error"; // return dtProfileCreation; // } // finally // { // con.Close(); // con.Dispose(); // ClsCon.da.Dispose(); // ClsCon.cmd.Dispose(); // } // return dtProfileCreation; //} internal DataSet BindAllProfileCreationDDL(ProfileCreationModel objPCModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPClientProfile"; ClsCon.cmd.Parameters.AddWithValue("@Ind", objPCModel.Ind); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dsProfileCreation = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dsProfileCreation); dsProfileCreation.DataSetName = "success"; dsProfileCreation.Tables[0].TableName = "OrganizationType"; dsProfileCreation.Tables[1].TableName = "BusinessNature"; dsProfileCreation.Tables[2].TableName = "BusinessType"; dsProfileCreation.Tables[3].TableName = "CopyType"; dsProfileCreation.Tables[4].TableName = "State"; dsProfileCreation.Tables[5].TableName = "ReportFormats"; dsProfileCreation.Tables[6].TableName = "CompositionCategory"; } catch (Exception) { dsProfileCreation = new DataSet(); dsProfileCreation.DataSetName = "error"; return(dsProfileCreation); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dsProfileCreation); }
public DataTable SaveCompanyProfile(ProfileCreationModel objPCModel) { DataTable dtSavePC = objPCDA.SaveCompanyProfile(objPCModel); return(dtSavePC); }
public DataSet BindAllProfileCreationDDL(ProfileCreationModel objPCModel) { DataSet dsProfileCreation = objPCDA.BindAllProfileCreationDDL(objPCModel); return(dsProfileCreation); }
protected void btnSave_Click(object sender, EventArgs e) { lblMsg.Text = lblMsg.CssClass = ""; bool IsValid = ValidationBtnSave(); if (!IsValid) { return; } bool chkUncheck = false; foreach (GridViewRow grdRow in grdReportFormats.Rows) { CheckBox chkSelectOnce = (CheckBox)grdRow.FindControl("chkSelectOnce"); if (chkSelectOnce.Checked == true) { hfFormatID.Value = ((Label)grdRow.FindControl("lblFormatID")).Text; chkUncheck = true; break; } } objPCModel = new ProfileCreationModel(); objPCModel.Ind = 1; objPCModel.CompName = txtCompanyName.Text; objPCModel.ShortName = txtShortName.Text; objPCModel.OrgType = Convert.ToInt32(ddlOrgType.SelectedValue); objPCModel.BusiNature = Convert.ToInt32(ddlBussiNature.SelectedValue); objPCModel.BusiType = Convert.ToInt32(ddlBussiType.SelectedValue); objPCModel.Addr = txtAddress.Text; objPCModel.City = txtCityCompany.Text; objPCModel.State = Convert.ToInt32(ddlStateCompany.SelectedValue); objPCModel.Pin = Convert.ToInt32(txtPincodeCompany.Text); objPCModel.Phone = txtLandLineNo.Text; objPCModel.Fax = txtFaxNo.Text; objPCModel.EMail = txtEmail.Text; objPCModel.PAN = txtPanNo.Text; objPCModel.TAN = txtTanNo.Text; objPCModel.CIN = txtCINNo.Text; objPCModel.IECode = txtImportExportCode.Text; objPCModel.ExportCtg = 0; objPCModel.ContactName = txtPersonName.Text; objPCModel.ContactDesg = txtDesiPerson.Text; objPCModel.ContactEmail = txtEmailPerson.Text; objPCModel.ContactMobile = txtMobileNoPerson.Text; objPCModel.AltPerson = txtPersonNameAlter.Text; objPCModel.AltPersonDesg = txtDesiPersonAlter.Text; objPCModel.AltPersonEmail = txtEmailPersonAlter.Text; objPCModel.AltMobile = txtMobileNoPersonAlter.Text; objPCModel.Composition = Convert.ToInt32(ddlComposiOpted.SelectedValue); objPCModel.CompositionDate = CommonCls.ConvertToDate(txtCompoEffDate.Text); objPCModel.GSTIN = string.IsNullOrEmpty(txtGSTIN.Text) ? "" : txtGSTIN.Text; objPCModel.RegDate = string.IsNullOrEmpty(CommonCls.ConvertToDate(txtRegDate.Text)) ? "" : CommonCls.ConvertToDate(txtRegDate.Text); objPCModel.RegAddr = string.IsNullOrEmpty(txtRegAddress.Text) ? "" : txtRegAddress.Text; objPCModel.RegCity = string.IsNullOrEmpty(txtCityGSTIN.Text) ? "" : txtCityGSTIN.Text; objPCModel.RegState = Convert.ToInt32(ddlStateGSTIN.SelectedValue) == 0 ? 0 : Convert.ToInt32(ddlStateGSTIN.SelectedValue); objPCModel.RegPin = string.IsNullOrEmpty(txtPincodeGSTIN.Text) ? 0 : Convert.ToInt32(txtPincodeGSTIN.Text); objPCModel.RegAuthPerson = txtAuthorizedSign.Text; objPCModel.RegAuthDesg = txtAuthorizedDesi.Text; objPCModel.InvoiceNoSeries = ""; //txtInvioceSeries.Text; objPCModel.InvoiceNo = 0; //string.IsNullOrEmpty(txtStartingNo.Text) ? 0 : Convert.ToInt32(txtStartingNo.Text); objPCModel.YrCD = GlobalSession.YrCD; objPCModel.User = GlobalSession.UserID; objPCModel.IP = GlobalSession.IP; objPCModel.InvoiceCaption1 = txtInvoiceCaption1.Text; objPCModel.InvoicePrint1 = Convert.ToInt32(ddlInvoicePrint1.SelectedValue); objPCModel.InvoiceCaption2 = txtInvoiceCaption2.Text; objPCModel.InvoicePrint2 = Convert.ToInt32(ddlInvoicePrint2.SelectedValue); objPCModel.InvoiceCaption3 = txtInvoiceCaption3.Text; objPCModel.InvoicePrint3 = Convert.ToInt32(ddlInvoicePrint3.SelectedValue); objPCModel.InvoiceCaption4 = txtInvoiceCaption4.Text; objPCModel.InvoicePrint4 = Convert.ToInt32(ddlInvoicePrint4.SelectedValue); objPCModel.InvoiceCaption5 = txtInvoiceCaption5.Text; objPCModel.InvoicePrint5 = Convert.ToInt32(ddlInvoicePrint5.SelectedValue); objPCModel.CompanyLogo = imgCompanyLogo.ImageUrl.Substring(imgCompanyLogo.ImageUrl.LastIndexOf("/") + 1); objPCModel.DtSeries = VsDtSeries; // Series Table objPCModel.UnRegistered = ddlCompanyType.SelectedValue == "1" ? 0 : ddlCompanyType.SelectedValue == "2" ? 0 : 1; objPCModel.CompanyType = Convert.ToInt32(ddlCompanyType.SelectedValue); objPCModel.TurnoverID = Convert.ToInt32(ddlTurnover.SelectedValue); objPCModel.TurnoverDescription = ddlTurnover.SelectedItem.Text; objPCModel.PrintHSNSACCode = Convert.ToInt32(ddlPrintTurnover.SelectedValue); objPCModel.BankName = txtBankName.Text; objPCModel.IFSCCode = txtIFSCCode.Text; objPCModel.AccountNumber = txtAccountNumber.Text; if (cbCopyType.Items[0].Selected) { objPCModel.InvoiceCopy1Header = cbCopyType.Items[0].Text; } if (cbCopyType.Items[1].Selected) { objPCModel.InvoiceCopy2Header = cbCopyType.Items[1].Text; } if (cbCopyType.Items[2].Selected) { objPCModel.InvoiceCopy3Header = cbCopyType.Items[2].Text; } if (cbCopyType.Items[3].Selected) { objPCModel.InvoiceCopy4Header = txtExtra1.Text; } if (cbCopyType.Items[4].Selected) { objPCModel.InvoiceCopy5Header = txtExtra2.Text; } objPCModel.InvoiceOnPrePrinted = Convert.ToInt32(ddlSIOnPrePrinted.SelectedValue); objPCModel.InvoiceCopyNo = string.IsNullOrEmpty(txtNoPrintedCopy.Text) ? 0 : Convert.ToInt32(txtNoPrintedCopy.Text); objPCModel.CompositionCategoryID = ddlCompositionCategory.SelectedItem == null ? 0 : Convert.ToInt32(ddlCompositionCategory.SelectedValue); if (VSDTCompositionCategory != null) // First Time DataTable Create For Grid { DataRow[] row = VSDTCompositionCategory.Select("CompositionCategoryID=" + Convert.ToInt32(ddlCompositionCategory.SelectedValue)); if (row.Count() > 0) { objPCModel.CompositionTaxRate = CommonCls.ConvertDecimalZero(row[0]["CompositionTaxRate"]); } } objPCModel.StcokMaintaneByMinorUnit = Convert.ToInt32(ddlStockMISecUnit.SelectedValue); if (chkUncheck == true) { objPCModel.ReportFormat = Convert.ToInt32(hfFormatID.Value); } else { lblMsg.Text = "Choose Invoice Format!"; ShowMessage(lblMsg.Text, false); return; } if (VSTerms != null) { objPCModel.DtTerms = VSTerms;//(DataTable)ViewState["dtTerms"]; } else { DataTable dtTerms = new DataTable(); dtTerms.Columns.Add("Terms", typeof(string)); dtTerms.Columns.Add("UserID", typeof(int)); dtTerms.Columns.Add("IP", typeof(string)); DataRow drTerms = dtTerms.NewRow(); drTerms["Terms"] = ""; drTerms["UserID"] = GlobalSession.UserID; drTerms["IP"] = GlobalSession.IP; dtTerms.Rows.Add(drTerms); objPCModel.DtTerms = dtTerms; } string uri = string.Format("ProfileCreation/SaveCompanyProfile"); DataTable dtSave = CommonCls.ApiPostDataTable(uri, objPCModel); if (dtSave.Rows.Count > 0) { if (dtSave.Rows[0]["RecordID"].ToString() == "0") { lblMsg.Text = "Record Not Save Please Try Again."; ShowMessage(lblMsg.Text, false); } else if (dtSave.Rows[0]["RecordID"].ToString() == "1") { ClearAll(); Response.Redirect("frmSuccessfullyProfileCreation.aspx?ProfileCreation=" + "Profile Create Successfully!&&OrgName=" + GlobalSession.OrgName); } else if (dtSave.Rows[0]["RecordID"].ToString() == "2") { lblMsg.Text = "Duplicate Record."; ShowMessage(lblMsg.Text, false); txtCompanyName.Focus(); } } else { lblMsg.Text = "Record Not Save Please Try Again."; ShowMessage(lblMsg.Text, false); } }
void LoadProfileCreationDDL() { try { objPCModel = new ProfileCreationModel(); objPCModel.Ind = 11; string uri = string.Format("ProfileCreation/BindAllProfileCreationDDL"); DataSet dsProfileCreation = CommonCls.ApiPostDataSet(uri, objPCModel); if (dsProfileCreation.Tables.Count > 0) { ddlOrgType.DataSource = dsProfileCreation.Tables["OrganizationType"]; ddlOrgType.DataTextField = "OrgTypeDesc"; ddlOrgType.DataValueField = "OrgTypeID"; ddlOrgType.DataBind(); ddlOrgType.Items.Insert(0, new ListItem("-- Org Type --", "0")); ddlBussiNature.DataSource = dsProfileCreation.Tables["BusinessNature"]; ddlBussiNature.DataTextField = "BusinessDesc"; ddlBussiNature.DataValueField = "BusinessID"; ddlBussiNature.DataBind(); ddlBussiNature.Items.Insert(0, new ListItem("-- Business Nature --", "0")); ddlBussiType.DataSource = dsProfileCreation.Tables["BusinessType"]; ddlBussiType.DataTextField = "BusinessTypeDesc"; ddlBussiType.DataValueField = "BusinessTypeID"; ddlBussiType.DataBind(); ddlBussiType.Items.Insert(0, new ListItem("-- Business Type --", "0")); cbCopyType.DataSource = dsProfileCreation.Tables["CopyType"]; cbCopyType.DataTextField = "CopyType"; cbCopyType.DataValueField = "CopyID"; cbCopyType.DataBind(); DataTable dtCompanyState = dsProfileCreation.Tables["State"]; DataTable dtGSTInfoState = dsProfileCreation.Tables["State"]; ddlStateCompany.DataSource = dtCompanyState; ddlStateCompany.DataTextField = "StateName"; ddlStateCompany.DataValueField = "StateID"; ddlStateCompany.DataBind(); ddlStateCompany.Items.Insert(0, new ListItem("-- State --", "0")); ddlStateGSTIN.DataSource = dtGSTInfoState; ddlStateGSTIN.DataTextField = "StateName"; ddlStateGSTIN.DataValueField = "StateID"; ddlStateGSTIN.DataBind(); ddlStateGSTIN.Items.Insert(0, new ListItem("-- State --", "0")); grdReportFormats.DataSource = dsProfileCreation.Tables["ReportFormats"]; grdReportFormats.DataBind(); ddlCompositionCategory.DataSource = VSDTCompositionCategory = dsProfileCreation.Tables["CompositionCategory"]; ddlCompositionCategory.DataTextField = "CompositionCategoryDesc"; ddlCompositionCategory.DataValueField = "CompositionCategoryID"; ddlCompositionCategory.DataBind(); ddlCompositionCategory.Items.Insert(0, new ListItem("-- Select --", "0")); } } catch (Exception ex) { ShowMessage(ex.Message, false); } }
internal DataTable SaveCompanyProfile(ProfileCreationModel objPCModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPClientProfile"; ClsCon.cmd.Parameters.AddWithValue("@Ind", objPCModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@CompName", objPCModel.CompName); ClsCon.cmd.Parameters.AddWithValue("@ShortName", objPCModel.ShortName); ClsCon.cmd.Parameters.AddWithValue("@OrgType", objPCModel.OrgType); ClsCon.cmd.Parameters.AddWithValue("@BusiNature", objPCModel.BusiNature); ClsCon.cmd.Parameters.AddWithValue("@BusiType", objPCModel.BusiType); ClsCon.cmd.Parameters.AddWithValue("@Addr", objPCModel.Addr); ClsCon.cmd.Parameters.AddWithValue("@City", objPCModel.City); ClsCon.cmd.Parameters.AddWithValue("@State", objPCModel.State); ClsCon.cmd.Parameters.AddWithValue("@Pin", objPCModel.Pin); ClsCon.cmd.Parameters.AddWithValue("@Phone", objPCModel.Phone); ClsCon.cmd.Parameters.AddWithValue("@Fax", objPCModel.Fax); ClsCon.cmd.Parameters.AddWithValue("@EMail", objPCModel.EMail); ClsCon.cmd.Parameters.AddWithValue("@PAN", objPCModel.PAN); ClsCon.cmd.Parameters.AddWithValue("@TAN", objPCModel.TAN); ClsCon.cmd.Parameters.AddWithValue("@CIN", objPCModel.CIN); ClsCon.cmd.Parameters.AddWithValue("@IECode", objPCModel.IECode); ClsCon.cmd.Parameters.AddWithValue("@ExportCtg", objPCModel.ExportCtg); ClsCon.cmd.Parameters.AddWithValue("@ContactName", objPCModel.ContactName); ClsCon.cmd.Parameters.AddWithValue("@ContactDesg", objPCModel.ContactDesg); ClsCon.cmd.Parameters.AddWithValue("@ContactEmail", objPCModel.ContactEmail); ClsCon.cmd.Parameters.AddWithValue("@ContactMobile", objPCModel.ContactMobile); ClsCon.cmd.Parameters.AddWithValue("@AltPerson", objPCModel.AltPerson); ClsCon.cmd.Parameters.AddWithValue("@AltPersonDesg", objPCModel.AltPersonDesg); ClsCon.cmd.Parameters.AddWithValue("@AltPersonEmail", objPCModel.AltPersonEmail); ClsCon.cmd.Parameters.AddWithValue("@AltMobile", objPCModel.AltMobile); ClsCon.cmd.Parameters.AddWithValue("@Composition", objPCModel.Composition); ClsCon.cmd.Parameters.AddWithValue("@CompositionDate", objPCModel.CompositionDate); ClsCon.cmd.Parameters.AddWithValue("@GSTIN", objPCModel.GSTIN); ClsCon.cmd.Parameters.AddWithValue("@RegDate", objPCModel.RegDate); ClsCon.cmd.Parameters.AddWithValue("@RegAddr", objPCModel.RegAddr); ClsCon.cmd.Parameters.AddWithValue("@RegCity", objPCModel.RegCity); ClsCon.cmd.Parameters.AddWithValue("@RegState", objPCModel.RegState); ClsCon.cmd.Parameters.AddWithValue("@RegPin", objPCModel.RegPin); ClsCon.cmd.Parameters.AddWithValue("@RegAuthPerson", objPCModel.RegAuthPerson); ClsCon.cmd.Parameters.AddWithValue("@RegAuthDesg", objPCModel.RegAuthDesg); ClsCon.cmd.Parameters.AddWithValue("@InvoiceNoSeries", objPCModel.InvoiceNoSeries); ClsCon.cmd.Parameters.AddWithValue("@InvoiceOnPrePrinted", objPCModel.InvoiceOnPrePrinted); ClsCon.cmd.Parameters.AddWithValue("@InvoiceNo", objPCModel.InvoiceNo); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objPCModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@User", objPCModel.User); ClsCon.cmd.Parameters.AddWithValue("@IP", objPCModel.IP); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCaption1", objPCModel.InvoiceCaption1); ClsCon.cmd.Parameters.AddWithValue("@InvoicePrint1", objPCModel.InvoicePrint1); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCaption2", objPCModel.InvoiceCaption2); ClsCon.cmd.Parameters.AddWithValue("@InvoicePrint2", objPCModel.InvoicePrint2); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCaption3", objPCModel.InvoiceCaption3); ClsCon.cmd.Parameters.AddWithValue("@InvoicePrint3", objPCModel.InvoicePrint3); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCaption4", objPCModel.InvoiceCaption4); ClsCon.cmd.Parameters.AddWithValue("@InvoicePrint4", objPCModel.InvoicePrint4); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCaption5", objPCModel.InvoiceCaption5); ClsCon.cmd.Parameters.AddWithValue("@InvoicePrint5", objPCModel.InvoicePrint5); ClsCon.cmd.Parameters.AddWithValue("@CompanyLogo", objPCModel.CompanyLogo); ClsCon.cmd.Parameters.AddWithValue("@ReportFormat", objPCModel.ReportFormat); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopyNo", objPCModel.InvoiceCopyNo); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopy1Header", objPCModel.InvoiceCopy1Header); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopy2Header", objPCModel.InvoiceCopy2Header); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopy3Header", objPCModel.InvoiceCopy3Header); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopy4Header", objPCModel.InvoiceCopy4Header); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopy5Header", objPCModel.InvoiceCopy5Header); ClsCon.cmd.Parameters.AddWithValue("@CompositionCategoryID", objPCModel.CompositionCategoryID); ClsCon.cmd.Parameters.AddWithValue("@CompositionTaxRate", objPCModel.CompositionTaxRate); ClsCon.cmd.Parameters.AddWithValue("@StcokMaintaneByMinorUnit", objPCModel.StcokMaintaneByMinorUnit); ClsCon.cmd.Parameters.AddWithValue("@CompanyType", objPCModel.CompanyType); ClsCon.cmd.Parameters.AddWithValue("@TurnoverID", objPCModel.TurnoverID); ClsCon.cmd.Parameters.AddWithValue("@TurnoverDescription", objPCModel.TurnoverDescription); ClsCon.cmd.Parameters.AddWithValue("@PrintHSNSACCode", objPCModel.PrintHSNSACCode); ClsCon.cmd.Parameters.AddWithValue("@BankName", objPCModel.BankName); ClsCon.cmd.Parameters.AddWithValue("@IFSCCode", objPCModel.IFSCCode); ClsCon.cmd.Parameters.AddWithValue("@AccountNumber", objPCModel.AccountNumber); ClsCon.cmd.Parameters.AddWithValue("@UnRegistered", objPCModel.UnRegistered); ClsCon.cmd.Parameters.AddWithValue("@SSIsTaken", objPCModel.SSIsTaken); ClsCon.cmd.Parameters.AddWithValue("@BSObtain", objPCModel.BSObtain); ClsCon.cmd.Parameters.AddWithValue("@CCCode", objPCModel.CCCode); ClsCon.cmd.Parameters.AddWithValue("@BankPayChqSeriesInd", objPCModel.BankPayChqSeriesInd); ClsCon.cmd.Parameters.AddWithValue("@TblTerms", objPCModel.DtTerms); ClsCon.cmd.Parameters.AddWithValue("@TblSeries", objPCModel.DtSeries); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtProfileCreation = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtProfileCreation); dtProfileCreation.TableName = "success"; } catch (Exception) { dtProfileCreation = new DataTable(); dtProfileCreation.TableName = "error"; return(dtProfileCreation); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtProfileCreation); }