protected void btnNewBOE_Click(object sender, EventArgs e) { Clear(); var BOEProvider = new BOEProvider(); if (txtRefLCNumber.Text == string.Empty) { MessageHelper.ShowAlertMessage("Please select reference LC number."); } DataTable dt = BOEProvider.GetDataForNewBOE(txtRefLCNumber.Text); if (dt.IsNotNull()) { txtBOENumber.Enabled = true; PopulateControls(dt); gvPurchaseOrder.DataSource = dt; gvPurchaseOrder.DataBind(); gvTaxInformation.Visible = true; gvTaxInformation.DataSource = dt; gvTaxInformation.DataBind(); } btnSave.Visible = true; btnUpdate.Visible = false; }
protected void btnUpdate_Click(object sender, EventArgs e) { mode = "Update"; CheckUserAuthentication(mode); bool msg = false; string message = string.Empty; try { BOEProvider boeProvider = boeInfoEntity(); List <BOEDetailProvider> boeDetailList = boeDetailEntityList(); List <TAXInfoProvider> taxInfoProviderList = taxInfoList(); if ((boeDetailList == null) || (boeDetailList.Count == 0)) { MessageHelper.ShowAlertMessage("Please select at least one product for purchase"); return; } msg = boeProvider.Update(boeDetailList, taxInfoProviderList); } catch (Exception ex) { message = ex.Message; } if (msg) { Clear(); this.AlertSuccess(lblMsg, MessageConstants.Updated); } else { MessageHelper.ShowAlertMessage(message); } }
protected void ddlPreviousBOE_SelectedIndexChanged(object sender, EventArgs e) { string lcNo = txtSystemLCNo.Text; if (ddlPreviousBOE.SelectedIndex == 0) { throw new Exception("Please select a boe number."); } string bOENumber = ddlPreviousBOE.SelectedItem.ToString(); var BOEProvider = new BOEProvider(); DataTable dt = BOEProvider.GetByLCAndBOENumber(lcNo, bOENumber); if (dt.IsNotNull()) { txtBOENumber.Enabled = false; txtSystemLCNo.Text = dt.Rows[0]["SystemLCNo"].ToString(); txtRefLCNumber.Text = dt.Rows[0]["BankLCNumber"].ToString(); txtExcRate.Text = dt.Rows[0]["ExcRate"].ToString(); txtBOENumber.Text = dt.Rows[0]["BOENumber"].ToString(); txtRefLCDate.Text = Convert.ToDateTime(dt.Rows[0]["LCOpeningDate"]).ToString("dd/MM/yyyy"); txtBOEDate.Text = Convert.ToDateTime(dt.Rows[0]["BOEDate"]).ToString("dd/MM/yyyy"); gvPurchaseOrder.DataSource = dt; gvPurchaseOrder.DataBind(); gvTaxInformation.Visible = true; gvTaxInformation.DataSource = dt; gvTaxInformation.DataBind(); } btnSave.Visible = false; btnUpdate.Visible = true; }
public bool Delete(BOEProvider provider) { bool IsDelete = false; try { SqlCommand command = new SqlCommand(); this.ConnectionOpen(); command.Connection = Connection; this.BeginTransaction(true); command.Transaction = this.Transaction; command.CommandType = CommandType.StoredProcedure; command.CommandText = StoredProcedureNames.RequisitionSet; command.Parameters.Add("@ID", SqlDbType.Int).Value = provider.ID; command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Delete; command.ExecuteNonQuery(); this.CommitTransaction(); this.ConnectionClosed(); IsDelete = true; } catch (Exception exp) { this.RollbackTransaction(); throw new Exception(exp.Message); } finally { this.ConnectionClosed(); } return(IsDelete); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { AddBlankRowTogvPurchaseProduct(); btnSave.Enabled = true; ddlPreviousBOE.Items.Add(new ListItem("----------Select----------", "0", true)); ddlPreviousBOE.DataSource = null; ddlPreviousBOE.DataBind(); txtBOEDate.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now); } else { Page.ClientScript.GetPostBackEventReference(this, String.Empty); String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"]; if (Request["__EVENTTARGET"] == "SearchPriceSetup") { var BOEProvider = new BOEProvider(); string code = Request["__EVENTARGUMENT"]; DataTable dt = BOEProvider.GetByID(code); DataTable bOE = BOEProvider.GetBOENumber(code); if (dt.IsNotNull() && dt.Rows.Count > 0) { lblMsg.InnerText = string.Empty; PopulateControls(dt); gvPurchaseOrder.DataSource = dt; gvPurchaseOrder.DataBind(); gvTaxInformation.Visible = false; btnSave.Visible = false; btnUpdate.Visible = false; btnClear.Visible = false; } else { txtRefLCNumber.Text = code; MessageHelper.ShowAlertMessage("No BOE found. Please select new BOE to enter one."); } if (bOE.Rows.Count > 0) { ddlPreviousBOE.Items.Clear(); ddlPreviousBOE.Items.Add(new ListItem("----------Select----------", "0", true)); ddlPreviousBOE.DataSource = bOE; ddlPreviousBOE.DataBind(); } else { ddlPreviousBOE.Items.Clear(); ddlPreviousBOE.Items.Add(new ListItem("----------Select----------", "0", true)); ddlPreviousBOE.DataSource = null; ddlPreviousBOE.DataBind(); btnSave.Visible = true; btnUpdate.Visible = false; } } } }
private BOEProvider boeInfoEntity() { BOEProvider entity = null; entity = new BOEProvider { SystemLCNo = txtSystemLCNo.Text, BOENumber = txtBOENumber.Text, ExcRate = txtExcRate.Text.ToDecimal(), BOEDate = DateTime.ParseExact(txtBOEDate.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture), EntryUserID = Convert.ToInt16(Session["ID"]) }; return(entity); }
private SqlCommand ProcedureFunction(BOEProvider provider) { SqlCommand command = new SqlCommand(); this.ConnectionOpen(); command.Connection = Connection; this.BeginTransaction(true); command.Transaction = this.Transaction; command.CommandType = CommandType.StoredProcedure; command.CommandText = StoredProcedureNames.RequisitionSet; command.Parameters.Add("@TransactionNo", SqlDbType.VarChar).Value = provider.TransactionNo; command.Parameters.Add("@BOENumber", SqlDbType.VarChar).Value = provider.BOENumber; command.Parameters.Add("@BOEDate", SqlDbType.DateTime).Value = provider.BOEDate; command.Parameters.Add("@SystemLCNo", SqlDbType.VarChar).Value = provider.SystemLCNo; return(command); }
protected void btnSave_Click(object sender, EventArgs e) { mode = "Save"; CheckUserAuthentication(mode); bool msg = false; string message = string.Empty; string transactionNo = string.Empty; try { BOEProvider boeProvider = boeInfoEntity(); List <BOEDetailProvider> boeDetailList = boeDetailEntityList(); List <TAXInfoProvider> taxInfoProviderList = taxInfoList(); if (boeProvider.ExcRate <= 0) { MessageHelper.ShowAlertMessage("Please input exchange rate for product(s)"); return; } if ((boeDetailList == null) || (boeDetailList.Count == 0)) //// check this validation later { MessageHelper.ShowAlertMessage("Please input data for product(s)"); return; } if (taxInfoProviderList.Count == 0) //// check this validation later { MessageHelper.ShowAlertMessage("Please input tax values for product(s)"); return; } msg = boeProvider.Save(boeDetailList, taxInfoProviderList, out transactionNo); } catch (Exception ex) { message = ex.Message; } if (msg) { Clear(); this.AlertSuccess(lblMsg, MessageConstants.Saved); } else { MessageHelper.ShowAlertMessage(message); } }
protected void Page_Load(object sender, EventArgs e) { DataTable dt; var reportPath = new ReportPath(); var reportParameter = new ReportParameter(); var reportDocument = new ReportDocument(); int reportType = Request.QueryString["ReportType"].Toint(); DateTime fromDate = Request.QueryString["fromDate"].ToDate(); DateTime toDate = Request.QueryString["toDate"].ToDate(); DateTime aDate = Request.QueryString["aDate"].ToDate(); int reportOption = Request.QueryString["reportOption"].Toint(); int reportCategory = Request.QueryString["reportCategory"].Toint(); int productID = Request.QueryString["productID"].Toint(); var transactionID = Request.QueryString["transactionNo"]; string printOption = Request.QueryString["printOption"]; //******** Updated Datetime ********// DateTime?fDate; DateTime?tDate; DateTime?Date; switch (reportType) { #region Supplier Report case ReportType.SupplierReport: //////////// For Supplier Info report var supplierProvider = new SupplierProvider(); int supplierTypeID = Request.QueryString["SupplierTypeID"].ToInt(); dt = supplierProvider.GetSupplierByTypeID(supplierTypeID); if (dt != null && dt.Rows.Count > 0) { reportDocument.Load(reportPath.SupplierReportPath); GetValue(dt, reportParameter, reportDocument); } else { GetMsg(reportParameter, reportDocument, reportPath); } break; case ReportType.SupplierProductReport: //////////// For Supplier Product report supplierProvider = new SupplierProvider(); int supplierID = Request.QueryString["SupplierID"].ToInt(); dt = supplierProvider.GetByID(supplierID); if (dt != null && dt.Rows.Count > 0) { reportDocument.Load(reportPath.SupplierProductReportPath); GetValue(dt, reportParameter, reportDocument); } else { GetMsg(reportParameter, reportDocument, reportPath); } break; #endregion #region Requisition Report case ReportType.RequisitionReport: //////////// For Requisition report var requisitionProvider = new RequisitionProvider(); fDate = GetNullfDatetime(); tDate = GetNulltDatetime(); Date = GetNullaDatetime(); if (reportOption == 3) { var requisitionNo = Request.QueryString["transactionNo"].Trim(); dt = requisitionProvider.GetByID(requisitionNo); if (dt != null && dt.Rows.Count > 0) { reportDocument.Load(reportPath.RequisitionReportPath); GetValueWithDate(dt, reportParameter, reportDocument); } else { GetMsg(reportParameter, reportDocument, reportPath); } } else { dt = requisitionProvider.GetAllByDateWise(productID, transactionID, fDate, tDate, Date, reportOption); if (dt != null && dt.Rows.Count > 0) { if (reportOption == 2) { reportDocument.Load(reportPath.RequisitionReportPath); GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate); } else if (reportOption == 1) { reportDocument.Load(reportPath.RequisitionReportPath); GetValueAGetDate(dt, reportParameter, reportDocument, Date); } } else { GetMsg(reportParameter, reportDocument, reportPath); } } break; #endregion #region Purchase Order Report case ReportType.PurchaseOrderReport: //////////// For Purchase Order report var purchaseOrderProvider = new PurchaseOrderProvider(); fDate = GetNullfDatetime(); tDate = GetNulltDatetime(); if (reportCategory == 1) { var purchaseOrderNo = Request.QueryString["transactionNo"].Trim(); dt = purchaseOrderProvider.GetByID(purchaseOrderNo); if (dt != null && dt.Rows.Count > 0) { decimal value = 0.00M; decimal totalValue = 0.00M; foreach (DataRow dr in dt.Rows) { value = Convert.ToDecimal(dr["Value"]); totalValue = totalValue + value; } string textValue = NumberToText(Convert.ToInt32(totalValue), true); System.Data.DataColumn newColumn = new System.Data.DataColumn("TotalAmountInText", typeof(System.String)); newColumn.DefaultValue = textValue; dt.Columns.Add(newColumn); reportDocument.Load(reportPath.PurchaseOrderReportPath); GetValueWithDate(dt, reportParameter, reportDocument); } else { GetMsg(reportParameter, reportDocument, reportPath); } } else if (reportCategory == 2) //// Purchase Order Detail Report - Single Product///////////////////// { dt = purchaseOrderProvider.GetAllData(productID); if (dt != null && dt.Rows.Count > 0) { reportDocument.Load(reportPath.PurchaseOrderDetailReportPath); GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate); } else { GetMsg(reportParameter, reportDocument, reportPath); } } break; #endregion #region Delivery Challan Report case ReportType.DeliveryChallanReport: //////////// For Delivery Challan Report var deliveryChallanProvider = new DeliveryChallanProvider(); fDate = GetNullfDatetime(); tDate = GetNulltDatetime(); if (reportOption == 2) { var deliveryChallanNo = Request.QueryString["transactionNo"].Trim(); dt = deliveryChallanProvider.GetByID(deliveryChallanNo); if (dt != null && dt.Rows.Count > 0) { reportDocument.Load(reportPath.DeliveryChallanReportPath); GetValueWithDate(dt, reportParameter, reportDocument); } else { GetMsg(reportParameter, reportDocument, reportPath); } } else { //dt = purchaseOrderProvider.GetAllByDateWise(productID, transactionID, fDate, tDate, adate, reportOption); //if (dt != null && dt.Rows.Count > 0) //{ // if (reportOption == 2) // { // reportDocument.Load(reportPath.RequisitionReportPath); // GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate); // } // else if (reportOption == 1) // { // reportDocument.Load(reportPath.RequisitionReportPath); // GetValueAGetDate(dt, reportParameter, reportDocument, adate); // } //} //else //{ // GetMsg(reportParameter, reportDocument, reportPath); //} } break; #endregion #region Production Requisition Report case ReportType.ProductionRequisitionReport: var productionRequisitionProvider = new ProductionRequisitionProvider(); fDate = GetNullfDatetime(); tDate = GetNulltDatetime(); if (reportOption == 2) { //var prodReqNo = Request.QueryString["transactionNo"].Trim(); //dt = productionRequisitionProvider.GetByID(prodReqNo); //if (dt != null && dt.Rows.Count > 0) //{ // reportDocument.Load(reportPath.ProductionRequisitionReportPath); // GetValueWithDate(dt, reportParameter, reportDocument); //} //else //{ // GetMsg(reportParameter, reportDocument, reportPath); //} } else { } break; #endregion #region Prodct Stock Report case ReportType.ProductCurrentStockReport: var productCurrentStockProvider = new ProductCurrentStockProvider { ProductID = Request.QueryString["ProductID"].ToInt(), DivisionID = Request.QueryString["DivisionID"].ToInt(), ProductType = Request.QueryString["ProductType"].ToInt(), FromDate = Request.QueryString["fromDate"].ToString(), Todate = Request.QueryString["todate"].ToString() }; if (productCurrentStockProvider.ProductID == 0) { dt = productCurrentStockProvider.GetDivisionAndItemwise(); if (dt != null && dt.Rows.Count > 0) { reportDocument.Load(reportPath.AllProductStockReportPath); GetValueWithDate(dt, reportParameter, reportDocument); } else { GetMsg(reportParameter, reportDocument, reportPath); } } else { var mushak16ProviderList = productCurrentStockProvider.GetAll(); if (mushak16ProviderList != null) { reportDocument.Load(reportPath.ProductIndividualStockReportPath); reportDocument.SetDataSource(mushak16ProviderList); GetAddressValue(reportParameter, reportDocument); technoCrystalReport.ReportSource = reportDocument; technoCrystalReport.DataBind(); } else { GetMsg(reportParameter, reportDocument, reportPath); } } break; #endregion #region LC Report case ReportType.LCReport: //////////// For LC report var lCProvider = new LCProvider(); fDate = GetNullfDatetime(); tDate = GetNulltDatetime(); if (reportCategory == 2) /////////////// LC Detail Report /////////////// { dt = lCProvider.GetByDateRangeWise(fromDate, toDate, reportCategory); if (dt != null && dt.Rows.Count > 0) { reportDocument.Load(reportPath.LCDetailReportPath); GetValueWithDate(dt, reportParameter, reportDocument); } else { GetMsg(reportParameter, reportDocument, reportPath); } } else if (reportCategory == 1) //// LC Summary Report ///////////////////// { dt = lCProvider.GetByDateRangeWise(fromDate, toDate, reportCategory); if (dt != null && dt.Rows.Count > 0) { reportDocument.Load(reportPath.LCSummaryReportPath); GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate); } else { GetMsg(reportParameter, reportDocument, reportPath); } } break; #endregion #region BOE Report case ReportType.BOEReport: //////////// For BOE report var bOEProvider = new BOEProvider(); fDate = GetNullfDatetime(); tDate = GetNulltDatetime(); if (reportCategory == 2) { dt = bOEProvider.GetByDateRangeWise(fromDate, toDate, reportCategory); if (dt != null && dt.Rows.Count > 0) { reportDocument.Load(reportPath.BOEDetailReportPath); GetValueWithDate(dt, reportParameter, reportDocument); } else { GetMsg(reportParameter, reportDocument, reportPath); } } else if (reportCategory == 1) //// BOE Summary Report ///////////////////// { dt = bOEProvider.GetByDateRangeWise(fromDate, toDate, reportCategory); if (dt != null && dt.Rows.Count > 0) { reportDocument.Load(reportPath.BOESummaryReportPath); GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate); } else { GetMsg(reportParameter, reportDocument, reportPath); } } break; #endregion #region QA Report case ReportType.QAReport: //////////// For QA report var qAQCRequisitionProvider = new QAQCRequisitionProvider(); fDate = GetNullfDatetime(); tDate = GetNulltDatetime(); Date = GetNullaDatetime(); dt = qAQCRequisitionProvider.GetDateWiseProductInfo(fDate, tDate, Date, productID); if (dt != null && dt.Rows.Count > 0) { { //if (reportOption == 1 && adate == null) //All product summary report //{ // reportDocument.Load(reportPath.QAReportPath); // GetValueWithDate(dt, reportParameter, reportDocument); //} //if (reportOption == 1 && adate == null) //All product summary report //{ // reportDocument.Load(reportPath.QAReportPath); // GetValueWithDate(dt, reportParameter, reportDocument); //} if (reportOption == 1) { reportDocument.Load(reportPath.QAReportPath); GetValueAGetDate(dt, reportParameter, reportDocument, Date); } else if (reportOption == 2) { reportDocument.Load(reportPath.QAReportPath); GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate); } //else if (reportOption == 3) // Purchase ID wise report (showing product details). //{ // reportDocument.Load(reportPath.QAReportPath); // GetValueWithDate(dt, reportParameter, reportDocument, printOption); //} } } else { GetMsg(reportParameter, reportDocument, reportPath); } break; #endregion #region Eng. Internal Requisition Report case ReportType.EngineeringInternalRequiReport: //////////// For Eng Requi report var engRequisitionProvider = new EngineeringRequisitionProvider(); var engRequisitionNo = Request.QueryString["transactionNo"].Trim(); dt = engRequisitionProvider.GetByID(engRequisitionNo); if (dt != null && dt.Rows.Count > 0) { { reportDocument.Load(reportPath.EngInternalRequiReportPath); GetValueWithDate(dt, reportParameter, reportDocument); } } else { GetMsg(reportParameter, reportDocument, reportPath); } break; #endregion } }
public bool Save(BOEProvider BOEProvider, List <BOEDetailProvider> BOEDetailProviderList, List <TAXInfoProvider> TAXInfoProviderList, out string transactionNo) { bool IsSave = false; try { SqlCommand command = new SqlCommand(); this.ConnectionOpen(); command.Connection = Connection; this.BeginTransaction(true); command.Transaction = this.Transaction; command.CommandType = CommandType.StoredProcedure; command.CommandText = StoredProcedureNames.BOEChallanSet; SqlParameter t = new SqlParameter("@TransactionNo", SqlDbType.VarChar); t.Direction = ParameterDirection.Output; t.Size = 16; command.Parameters.Add(t); SqlParameter id = new SqlParameter("@ID", SqlDbType.Int); id.Direction = ParameterDirection.Output; command.Parameters.Add(id); command.Parameters.Add("@BOENumber", SqlDbType.VarChar).Value = BOEProvider.BOENumber; command.Parameters.Add("@ExcRate", SqlDbType.Decimal).Value = BOEProvider.ExcRate; command.Parameters.Add("@BOEDate", SqlDbType.DateTime).Value = BOEProvider.BOEDate; command.Parameters.Add("@SystemLCNo", SqlDbType.VarChar).Value = BOEProvider.SystemLCNo; command.Parameters.Add("@EntryUserID", SqlDbType.Int).Value = BOEProvider.EntryUserID; command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Insert; command.ExecuteNonQuery(); transactionNo = (string)command.Parameters["@TransactionNo"].Value; int BOEID = (int)command.Parameters["@ID"].Value; foreach (BOEDetailProvider BOEDetailProvider in BOEDetailProviderList) { command = new SqlCommand(); command.Connection = Connection; command.Transaction = this.Transaction; command.CommandType = CommandType.StoredProcedure; command.CommandText = StoredProcedureNames.BOEChallanDetailSet; command.Parameters.Add("@BOEID", SqlDbType.Int).Value = BOEID; command.Parameters.Add("@ProductID", SqlDbType.Int).Value = BOEDetailProvider.ProductID; command.Parameters.Add("@HSCode", SqlDbType.VarChar).Value = BOEDetailProvider.HSCode; command.Parameters.Add("@ActualQuantity", SqlDbType.Decimal).Value = BOEDetailProvider.ActualQuantity; command.Parameters.Add("@InvoiceQuantity", SqlDbType.Decimal).Value = BOEDetailProvider.InvoiceQuantity; command.Parameters.Add("@RemainingQuantity", SqlDbType.Decimal).Value = BOEDetailProvider.RemainingQuantity; command.Parameters.Add("@InvoiceValue", SqlDbType.Decimal).Value = BOEDetailProvider.InvoiceValue; command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Insert; command.ExecuteNonQuery(); } foreach (TAXInfoProvider TaxInfoProvider in TAXInfoProviderList) { command = new SqlCommand(); command.Connection = Connection; command.Transaction = this.Transaction; command.CommandType = CommandType.StoredProcedure; command.CommandText = StoredProcedureNames.TAXInfoSet; command.Parameters.Add("@BOEID", SqlDbType.Int).Value = BOEID; command.Parameters.Add("@BOENumber", SqlDbType.VarChar).Value = BOEProvider.BOENumber; command.Parameters.Add("@ProductID", SqlDbType.Int).Value = TaxInfoProvider.ProductID; command.Parameters.Add("@AssessmentValue", SqlDbType.VarChar).Value = TaxInfoProvider.AssessmentValue; command.Parameters.Add("@CDPerc", SqlDbType.Decimal).Value = TaxInfoProvider.CDPerc; command.Parameters.Add("@CDAmt", SqlDbType.Decimal).Value = TaxInfoProvider.CDAmt; command.Parameters.Add("@SDPerc", SqlDbType.Decimal).Value = TaxInfoProvider.SDPerc; command.Parameters.Add("@SDAmt", SqlDbType.Decimal).Value = TaxInfoProvider.SDAmt; command.Parameters.Add("@RDPerc", SqlDbType.Decimal).Value = TaxInfoProvider.RDPerc; command.Parameters.Add("@RDAmt", SqlDbType.Decimal).Value = TaxInfoProvider.RDAmt; command.Parameters.Add("@VATPerc", SqlDbType.Decimal).Value = TaxInfoProvider.VATPerc; command.Parameters.Add("@VATAmt", SqlDbType.Decimal).Value = TaxInfoProvider.VATAmt; command.Parameters.Add("@AITPerc", SqlDbType.Decimal).Value = TaxInfoProvider.AITPerc; command.Parameters.Add("@AITAmt", SqlDbType.Decimal).Value = TaxInfoProvider.AITAmt; command.Parameters.Add("@ATVPerc", SqlDbType.Decimal).Value = TaxInfoProvider.ATVPerc; command.Parameters.Add("@ATVAmt", SqlDbType.Decimal).Value = TaxInfoProvider.ATVAmt; command.Parameters.Add("@DFCVATFPAmt", SqlDbType.Decimal).Value = TaxInfoProvider.DFCVATFPAmt; command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Insert; command.ExecuteNonQuery(); } this.CommitTransaction(); this.ConnectionClosed(); IsSave = true; } catch (Exception exp) { this.RollbackTransaction(); throw new Exception(exp.Message); } finally { this.ConnectionClosed(); } return(IsSave); }