private void monoFlat_Button1_Click(object sender, EventArgs e) { string gelenDeger; SelectClass select = new SelectClass(); SimilarityClass similar = new SimilarityClass(); QueryExecute execute = new QueryExecute(); DbConnect con = new DbConnect(); TableColControl control; select.regexContol(similar.editQuery(queryTxt.Text.Trim().ToLower())); gelenDeger = ResultClass.getResult(); DataTable table = new DataTable(); try { execute.executeAdapter(gelenDeger).Fill(table); dataGridView1.DataSource = table; ResultClass.setResult(""); con.dbConnection().Close(); } catch (Exception) { SimilarityClass similar2 = new SimilarityClass(); control = new TableColControl(); string sorgu = similar2.editQuery(queryTxt.Text.Trim().ToLower()); MessageBox.Show(gelenDeger, "HATALI SORGU", MessageBoxButtons.OK, MessageBoxIcon.Stop); ResultClass.setResult(""); } }
public int Insert(ProductTransaction anObject, SqlTransaction trans) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@DealID", anObject.DealID) , new SqlParameter("@TransactionType", anObject.TransactionType.ToString()) , new SqlParameter("@TransactionDate", anObject.TransactionDate) , new SqlParameter("@TransactionAmount", anObject.TransactionAmount) , new SqlParameter("@TransactionAmountType", anObject.TransactionAmountType.ToString()) , new SqlParameter("@Conditional", anObject.Conditional) , new SqlParameter("@PartyBID", anObject.PartyBID) , new SqlParameter("@DealAmount", anObject.DealAmount) , new SqlParameter("@BalanceAmount", anObject.BalanceAmount) , new SqlParameter("@HasNextTransaction", anObject.HasNextTransaction) , new SqlParameter("@NextTransactionAmountType", anObject.NextTransactionAmountType) , new SqlParameter("@NextTransactionAmount", anObject.NextTransactionAmount) , new SqlParameter("@NextTransactionDueDate", anObject.NextTransactionDueDate) , new SqlParameter("@CommissionDeducted", anObject.CommissionDeducted) , new SqlParameter("@DocumentReference", anObject.DocumentReference) , new SqlParameter("@State", anObject.State.ToString()) }; returnValue = QueryExecute.StoredProcedure(INSERT, trans, SP_Parameters); return(returnValue); }
public int Insert(InvestmentGroupDetail anObject, SqlTransaction aTrans) { int returnValue = 0; SqlParameter[] SP_Parameters = { new SqlParameter("@InvestmentGroupID", anObject.InvestmentGroupID) , new SqlParameter("@InvestmentID", anObject.InvestmentID) , new SqlParameter("@InHand", anObject.InHand) , new SqlParameter("@BackUp", anObject.BackUp) , new SqlParameter("@TotalAmount", anObject.TotalAmount) , new SqlParameter("@ContributionPercentage", anObject.ContributionPercentage) , new SqlParameter("@State", anObject.State.ToString()) }; try { returnValue = QueryExecute.StoredProcedure(INSERT, aTrans, SP_Parameters); } catch (SqlException ex) { throw ex; } return(returnValue); }
public int Insert(Investor anObject) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@ID", anObject.ID) , new SqlParameter("@Name", anObject.Name) , new SqlParameter("@State", anObject.State.ToString()) }; try { returnValue = QueryExecute.StoredProcedure(INSERT, SP_Parameters); } catch (SqlException ex) { if (ex.Number == 2627) { throw new DataEntryExistence("Duplication! This Investor is Already Added."); } } catch (Exception ex) { throw ex; } return(returnValue); }
public void UpdateDeductFT(int SearchByID, SqlTransaction atrans) { SqlParameter[] SP_Parameters = { new SqlParameter("@ID", SearchByID) }; QueryExecute.StoredProcedure(UPDATEDEDUCTFT, atrans, SP_Parameters); }
public void Update(int SearchByID) { SqlParameter[] SP_Parameters = { new SqlParameter("@ID", SearchByID) }; QueryExecute.StoredProcedure(UPDATEACCUMULATE, SP_Parameters); }
public void UpdateDeductDealFT(int SearchByID, double DeductionAmount, SqlTransaction atrans) { SqlParameter[] SP_Parameters = { new SqlParameter("@ID", SearchByID) , new SqlParameter("@DeductionAmount", DeductionAmount) }; QueryExecute.StoredProcedure(UPDATEDEDUCTDEALFT, atrans, SP_Parameters); }
public void Update(int SearchByID, InvestmentGroupDetail anObject, SqlTransaction aTans) { SqlParameter[] SP_Parameters = { new SqlParameter("@ID", SearchByID) , new SqlParameter("@InHand", anObject.InHand) }; QueryExecute.StoredProcedure(UPDATEBYINHAND, aTans, SP_Parameters); }
private void monoFlat_Button1_Click_1(object sender, EventArgs e) { string gelenDeger; DbConnect con = new DbConnect(); SelectClass select = new SelectClass(); SimilarityClass similar = new SimilarityClass(); QueryExecute execute = new QueryExecute(); TableColControl control; select.regexContol(similar.editQuery(queryTxt.Text.Trim().ToLower())); gelenDeger = ResultClass.getResult(); DataTable table = new DataTable(); DataTable sorguTable = new DataTable(); dataGridView1.DataSource = null; dataGridView1.Refresh(); try { execute.executeAdapter(gelenDeger).Fill(table); execute.executeAdapter(gelenCevap).Fill(sorguTable); if (!execute.AreTablesTheSame(table, sorguTable)) { dataGridView1.DataSource = table; label1.Visible = true; label1.Text = "Sorgu Yapısı Doğru; Fakat Sorgunuz Cevap Ile Uyuşmuyor !"; button1.Enabled = false; button1.BackColor = Color.LightGray; gelenDeger = ""; ResultClass.setResult(""); } else { dataGridView1.DataSource = table; ResultClass.setResult(""); button1.Enabled = true; button1.BackColor = Color.ForestGreen; label1.Visible = false; } con.dbConnection().Close(); } catch (Exception) { SimilarityClass similar2 = new SimilarityClass(); control = new TableColControl(); string sorgu = similar2.editQuery(queryTxt.Text.Trim().ToLower()); // MessageBox.Show(gelenDeger, "HATALI SORGU", MessageBoxButtons.OK, MessageBoxIcon.Stop); label1.Visible = true; label1.Text = gelenDeger; ResultClass.setResult(""); } }
public void Delete(int DeleteByID) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@ID", DeleteByID) }; returnValue = QueryExecute.StoredProcedure(DELETEBYID, SP_Parameters); }
public int Update(int SearchByID, Investment anObject, SqlTransaction aTrans) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@ID", SearchByID) , new SqlParameter("@InHand", anObject.InHand) }; returnValue = QueryExecute.StoredProcedure(UPDATEBYINHAND, aTrans, SP_Parameters); return(returnValue); }
public void UpdateByTransactionAmount(int SearchByID, ProductTransaction anObject, SqlTransaction atrans) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@ID", SearchByID) , new SqlParameter("@TransactionAmount", anObject.TransactionAmount) , new SqlParameter("@ProductTransactionType", anObject.TransactionType.ToString()) }; returnValue = QueryExecute.StoredProcedure(UPDATEBYTRANSACTIONAMOUNT, atrans, SP_Parameters); }
public int Insert(Contact anObject) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@FullName", anObject.FullName) , new SqlParameter("@Type", anObject.Type.ToString()) , new SqlParameter("@NIC", anObject.NIC) , new SqlParameter("@State", anObject.State.ToString()) }; returnValue = QueryExecute.StoredProcedure(INSERT, SP_Parameters); return(returnValue); }
public int Insert(Agent anObject) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@ID", anObject.ID) , new SqlParameter("@Name", anObject.Name) , new SqlParameter("@AgentType", anObject.AgentType.ToString()) , new SqlParameter("@IsContributer", anObject.IsContributer) , new SqlParameter("@ContributionAmount", anObject.ContributionAmount) , new SqlParameter("@ContributionPercentage", anObject.ContributionPercentage) , new SqlParameter("@ContributionRatioType", anObject.ContributionRatioType.ToString()) , new SqlParameter("@IsOnCommission", anObject.IsOnCommission) , new SqlParameter("@CommissionAmount", anObject.CommissionAmount) , new SqlParameter("@CommissionPercentage", anObject.CommissionPercentage) , new SqlParameter("@CommissionRatioType", anObject.CommissionRatioType.ToString()) , new SqlParameter("@IsOnSalary", anObject.IsOnSalary) , new SqlParameter("@SalaryAmount", anObject.SalaryAmount) , new SqlParameter("@SalaryPercentage", anObject.SalaryPercentage) , new SqlParameter("@SalaryRatioType", anObject.SalaryRatioType.ToString()) , new SqlParameter("@State", anObject.State.ToString()) }; try { returnValue = QueryExecute.StoredProcedure(INSERT, SP_Parameters); } catch (SqlException ex) { if (ex.Number == 2627) { throw new DataEntryExistence("Duplication! This Agent is Already Added."); } } catch (Exception ex) { throw ex; } return(returnValue); }
public int Insert(AgentGroupDetail anObject) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@AgentGroupID", anObject.AgentGroupID) , new SqlParameter("@AgentID", anObject.AgentID) , new SqlParameter("@Percentage", anObject.Percentage) , new SqlParameter("@Amount", anObject.Amount) , new SqlParameter("@RatioType", anObject.RatioType.ToString()) , new SqlParameter("@State", anObject.State.ToString()) }; returnValue = QueryExecute.StoredProcedure(INSERT, SP_Parameters); return(returnValue); }
public int Insert(AgentGroup anObject) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@Name", anObject.Name) , new SqlParameter("@HasMultipleAgents", anObject.HasMultipleAgents) , new SqlParameter("@AgentsCount", anObject.AgentsCount) , new SqlParameter("@State", anObject.State.ToString()) }; returnValue = QueryExecute.StoredProcedure(INSERT, SP_Parameters); return(returnValue); }
public int Insert(Investment anObject, SqlTransaction aTrans) { int returnValue = 0; SqlParameter[] SP_Parameters = { new SqlParameter("@InvestorID", anObject.InvestorDetails.ID) , new SqlParameter("@Name", anObject.Name) , new SqlParameter("@InHand", anObject.InHand) , new SqlParameter("@BackUp", anObject.BackUp) , new SqlParameter("@TotalAmount", anObject.TotalAmount) , new SqlParameter("@State", anObject.State.ToString()) }; returnValue = QueryExecute.StoredProcedure(INSERT, aTrans, SP_Parameters); return(returnValue); }
public int Insert(Product anObject) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@PlotNo", anObject.PlotNo) , new SqlParameter("@Block", anObject.Block) , new SqlParameter("@Sector", anObject.Sector) , new SqlParameter("@Mesuring", anObject.Mesuring) , new SqlParameter("@Scheme", anObject.Scheme) , new SqlParameter("@OnGround", anObject.OnGround) , new SqlParameter("@State", anObject.State.ToString()) }; returnValue = QueryExecute.StoredProcedure(INSERT, SP_Parameters); return(returnValue); }
public int Insert(FinancialTransaction anObject, SqlTransaction aTrans) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@Amount", anObject.Amount) , new SqlParameter("@TransactionType", anObject.TransactionType.ToString()) , new SqlParameter("@TransactionReference", anObject.TransactionReference) , new SqlParameter("@TransactionDate", anObject.TransactionDate) , new SqlParameter("@ContactID", anObject.ContactID) , new SqlParameter("@WalletType", anObject.WalletType.ToString()) , new SqlParameter("@WalletReference", anObject.WalletReference) , new SqlParameter("@FlowType", anObject.FlowType.ToString()) }; returnValue = QueryExecute.StoredProcedure(INSERT, aTrans, SP_Parameters); return(returnValue); }
public int Insert(Deal anObject) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@Name", anObject.Name) , new SqlParameter("@AgentGroupID", anObject.AgentGroupID) , new SqlParameter("@InvestmentGroupID", anObject.InvestmentGroupID) , new SqlParameter("@ProductID", anObject.ProductID) , new SqlParameter("@PurchaseAmount", anObject.PurchaseAmount) , new SqlParameter("@SaleAmount", anObject.SaleAmount) , new SqlParameter("@State", anObject.State.ToString()) }; returnValue = QueryExecute.StoredProcedure(INSERT, SP_Parameters); return(returnValue); }
public int Insert(InvestmentGroup anObject) { int returnValue = -1; SqlParameter[] SP_Parameters = { new SqlParameter("@Name", anObject.Name) , new SqlParameter("@InHand", anObject.InHand) , new SqlParameter("@BackUp", anObject.BackUp) , new SqlParameter("@TotalAmount", anObject.TotalAmount) , new SqlParameter("@InHand_Re", anObject.Inhand_Remaining) , new SqlParameter("@BackUp_Re", anObject.BackUp_Remaining) , new SqlParameter("@TotalAmount_Re", anObject.TotalAmount_Remaining) , new SqlParameter("@HasMultipleInvestments", anObject.HasMultipleInvestments) , new SqlParameter("@InvestmentCount", anObject.InvestmentsCount) , new SqlParameter("@DealID", anObject.DealID) , new SqlParameter("@State", anObject.State.ToString()) }; returnValue = QueryExecute.StoredProcedure(INSERT, SP_Parameters); return(returnValue); }
public AbstractQueryAction(QueryExecute queryAction) { _action = queryAction; }