Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         AddBlankRowTogvPurchaseProduct();
         btnSave.Enabled       = true;
         txtShipmentDate.Text  = string.Format("{0:dd/MM/yyyy}", DateTime.Now);
         txtExpiryDate.Text    = string.Format("{0:dd/MM/yyyy}", DateTime.Now);
         txtLCOpeningDate.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       lCProvider = new LCProvider();
             string    code       = Request["__EVENTARGUMENT"];
             DataTable dt         = lCProvider.GetByID(code);
             if (dt.IsNotNull())
             {
                 PopulateControls(dt);
                 gvLC.DataSource = dt;
                 gvLC.DataBind();
             }
             btnSave.Visible   = false;
             btnUpdate.Visible = true;
         }
     }
 }
Пример #2
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            mode = "Update";
            //   CheckUserAuthentication(mode);

            bool   msg     = false;
            string message = string.Empty;

            try
            {
                LCProvider purchaseOrderProvider = LCInfoEntity();
                List <LCDetailProvider> purchaseOrderDetailList = purchaseOrderDetailEntityList();
                if ((purchaseOrderDetailList == null) || (purchaseOrderDetailList.Count == 0))
                {
                    MessageHelper.ShowAlertMessage("Please select at least one product for purchase");

                    return;
                }
                msg = purchaseOrderProvider.Update(purchaseOrderDetailList);
            }
            catch (Exception ex)
            {
                message = ex.Message;
            }
            if (msg)
            {
                Clear();
                this.AlertSuccess(lblMsg, MessageConstants.Updated);
            }
            else
            {
                MessageHelper.ShowAlertMessage(message);
            }
        }
Пример #3
0
        public bool Delete(LCProvider 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);
        }
Пример #4
0
        private SqlCommand ProcedureFunction(LCProvider 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("@PurchaseOrderDate", SqlDbType.DateTime).Value = provider.LCOpeningDate;
            command.Parameters.Add("@SupplierID", SqlDbType.VarChar).Value         = provider.SupplierID;
            return(command);
        }
Пример #5
0
        private LCProvider LCInfoEntity()
        {
            if (ddlModeOfTransport.SelectedIndex == 0)
            {
                throw new Exception("Mode of transport never be empty");
            }
            LCProvider entity = null;

            entity = new LCProvider
            {
                TransactionNo   = txtSystemLCNo.Text,
                LCAFNumber      = txtLCAFNumber.Text,
                BankLCNumber    = txtBankLCNumber.Text,
                LCOpeningDate   = DateTime.ParseExact(txtLCOpeningDate.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture),
                ShipmentDate    = DateTime.ParseExact(txtShipmentDate.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture),
                ExpiryDate      = DateTime.ParseExact(txtExpiryDate.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture),
                ModeOfTransport = ddlModeOfTransport.SelectedItem.Text,
                SupplierID      = int.Parse(ddlSupplier.SelectedValue),
                EntryUserID     = Convert.ToInt16(Session["ID"]),
                UpdateUserID    = Convert.ToInt16(Session["ID"])
            };
            return(entity);
        }
Пример #6
0
        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
            }
        }
Пример #7
0
        public bool Save(LCProvider LCProvider, List <LCDetailProvider> LCDetailProviderList, 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.LCChallanSet;
                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("@BankLCNumber", SqlDbType.VarChar).Value    = LCProvider.BankLCNumber;
                command.Parameters.Add("@LCAFNumber", SqlDbType.VarChar).Value      = LCProvider.LCAFNumber;
                command.Parameters.Add("@ModeOfTransport", SqlDbType.VarChar).Value = LCProvider.ModeOfTransport;
                command.Parameters.Add("@LCOpeningDate", SqlDbType.DateTime).Value  = LCProvider.LCOpeningDate;
                command.Parameters.Add("@ShipmentDate", SqlDbType.DateTime).Value   = LCProvider.ShipmentDate;
                command.Parameters.Add("@ExpiryDate", SqlDbType.DateTime).Value     = LCProvider.ExpiryDate;
                command.Parameters.Add("@SupplierID", SqlDbType.Int).Value          = LCProvider.SupplierID;
                command.Parameters.Add("@EntryUserID", SqlDbType.Int).Value         = LCProvider.EntryUserID;
                command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Insert;
                command.ExecuteNonQuery();
                transactionNo = (string)command.Parameters["@TransactionNo"].Value;
                int LCChallanID = (int)command.Parameters["@ID"].Value;

                foreach (LCDetailProvider LCDetailProvider in LCDetailProviderList)
                {
                    command             = new SqlCommand();
                    command.Connection  = Connection;
                    command.Transaction = this.Transaction;
                    command.CommandType = CommandType.StoredProcedure;
                    command.CommandText = StoredProcedureNames.LCChallanDetailSet;
                    command.Parameters.Add("@LCChallanID", SqlDbType.Int).Value        = LCChallanID;
                    command.Parameters.Add("@ProductID", SqlDbType.Int).Value          = LCDetailProvider.ProductID;
                    command.Parameters.Add("@RequisitionRef", SqlDbType.VarChar).Value = LCDetailProvider.RequisitionRef;
                    command.Parameters.Add("@Value", SqlDbType.Decimal).Value          = LCDetailProvider.Value;
                    command.Parameters.Add("@Rate", SqlDbType.Decimal).Value           = LCDetailProvider.Rate;
                    command.Parameters.Add("@Currency", SqlDbType.VarChar).Value       = LCDetailProvider.Currency;
                    command.Parameters.Add("@Quantity", SqlDbType.Decimal).Value       = LCDetailProvider.Quantity;
                    command.Parameters.Add("@Option", SqlDbType.Int).Value             = DBConstants.DataModificationOption.Insert;
                    command.ExecuteNonQuery();
                }

                //////////////////////////////////// LC Amendment ///////////////////////////////////////////
                foreach (LCDetailProvider LCDetailProvider in LCDetailProviderList)
                {
                    command             = new SqlCommand();
                    command.Connection  = Connection;
                    command.Transaction = this.Transaction;
                    command.CommandType = CommandType.StoredProcedure;
                    command.CommandText = StoredProcedureNames.LCAmendmentSet;
                    command.Parameters.Add("@BankLCNumber", SqlDbType.VarChar).Value    = LCProvider.BankLCNumber;
                    command.Parameters.Add("@SystemLCNo", SqlDbType.VarChar).Value      = transactionNo;
                    command.Parameters.Add("@LCAFNumber", SqlDbType.VarChar).Value      = LCProvider.LCAFNumber;
                    command.Parameters.Add("@ModeOfTransport", SqlDbType.VarChar).Value = LCProvider.ModeOfTransport;
                    command.Parameters.Add("@LCOpeningDate", SqlDbType.DateTime).Value  = LCProvider.LCOpeningDate;
                    command.Parameters.Add("@ShipmentDate", SqlDbType.DateTime).Value   = LCProvider.ShipmentDate;
                    command.Parameters.Add("@ExpiryDate", SqlDbType.DateTime).Value     = LCProvider.ExpiryDate;
                    command.Parameters.Add("@SupplierID", SqlDbType.Int).Value          = LCProvider.SupplierID;
                    command.Parameters.Add("@EntryUserID", SqlDbType.Int).Value         = LCProvider.EntryUserID;
                    command.Parameters.Add("@EntryDate", SqlDbType.DateTime).Value      = DateTime.Now;
                    command.Parameters.Add("@ProductID", SqlDbType.Int).Value           = LCDetailProvider.ProductID;
                    command.Parameters.Add("@RequisitionRef", SqlDbType.VarChar).Value  = LCDetailProvider.RequisitionRef;
                    command.Parameters.Add("@Value", SqlDbType.Decimal).Value           = LCDetailProvider.Value;
                    command.Parameters.Add("@Rate", SqlDbType.Decimal).Value            = LCDetailProvider.Rate;
                    command.Parameters.Add("@Currency", SqlDbType.VarChar).Value        = LCDetailProvider.Currency;
                    command.Parameters.Add("@Quantity", SqlDbType.Decimal).Value        = LCDetailProvider.Quantity;
                    command.ExecuteNonQuery();
                }
                this.CommitTransaction();
                this.ConnectionClosed();
                IsSave = true;
            }
            catch (Exception exp)
            {
                this.RollbackTransaction();
                throw new Exception(exp.Message);
            }
            finally
            {
                this.ConnectionClosed();
            }
            return(IsSave);
        }