public DataSet SelectCombo_Data(tbl_AnnualIncomeProp Objtbl_AnnualIncomeProp)
 {
     try
     {
         tbl_AnnualIncomeDAL Objtbl_AnnualIncomeDAL = new tbl_AnnualIncomeDAL();
         return(Objtbl_AnnualIncomeDAL.SelectCombo_Data(Objtbl_AnnualIncomeProp));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public int Delete_Data(tbl_AnnualIncomeProp Objtbl_AnnualIncomeProp)
 {
     try
     {
         tbl_AnnualIncomeDAL Objtbl_AnnualIncomeDAL = new tbl_AnnualIncomeDAL();
         return(Objtbl_AnnualIncomeDAL.Delete_Data(Objtbl_AnnualIncomeProp));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #3
0
 public DataSet SelectCombo_Data(tbl_AnnualIncomeProp Objtbl_AnnualIncomeProp)
 {
     try
     {
         //Database DB = DatabaseFactory.CreateDatabase("AppConAnant");
         //DbCommand DBCmd = DB.GetStoredProcCommand("SelectCombo_tbl_AnnualIncome");
         //return DB.ExecuteDataSet(DBCmd);
         return(null);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #4
0
 public int Delete_Data(tbl_AnnualIncomeProp Objtbl_AnnualIncomeProp)
 {
     try
     {
         //Database DB = DatabaseFactory.CreateDatabase("AppConAnant");
         //DbCommand DBCmd = DB.GetStoredProcCommand("Delete_tbl_AnnualIncome");
         //DB.AddInParameter(DBCmd, "@AnnualIncomeCode", DbType.Int32, Objtbl_AnnualIncomeProp.AnnualIncomeCode);
         //return DB.ExecuteNonQuery(DBCmd);
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #5
0
 public DataSet Search_Data(tbl_AnnualIncomeProp Objtbl_AnnualIncomeProp)
 {
     try
     {
         //Database DB = DatabaseFactory.CreateDatabase("AppConAnant");
         //DbCommand DBCmd = DB.GetStoredProcCommand("Search_tbl_AnnualIncome");
         //DB.AddInParameter(DBCmd, "@SearchBy", DbType.String, Objtbl_AnnualIncomeProp.SearchBy);
         //DB.AddInParameter(DBCmd, "@SearchVal", DbType.String, Objtbl_AnnualIncomeProp.SearchVal);
         //return DB.ExecuteDataSet(DBCmd);
         return(null);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #6
0
 public DataSet Select_Data(tbl_AnnualIncomeProp Objtbl_AnnualIncomeProp, ref int TotalCount, int AnnualIncomeCode)
 {
     try
     {
         DataSet dsData = objdb.ExecuteDataset("Select_tbl_AnnualIncome", AnnualIncomeCode, 1, 100, 0);
         //Database DB = DatabaseFactory.CreateDatabase("AppConAnant");
         //DbCommand DBCmd = DB.GetStoredProcCommand("Select_tbl_AnnualIncome");
         //DB.AddInParameter(DBCmd, "@AnnualIncomeCode", DbType.Int32, Objtbl_AnnualIncomeProp.AnnualIncomeCode);
         //DB.AddInParameter(DBCmd, "@PageNo", DbType.Int32, Objtbl_AnnualIncomeProp.PageNo);
         //DB.AddInParameter(DBCmd, "@RecordCount", DbType.Int32, Objtbl_AnnualIncomeProp.RecordCount);
         //DB.AddOutParameter(DBCmd, "@TotalCount", DbType.Int32, 18);
         //DataSet dsData = DB.ExecuteDataSet(DBCmd);
         //TotalCount = Convert.ToInt32(DBCmd.Parameters["@TotalCount"].Value);
         TotalCount = 100;
         return(dsData);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #7
0
        public int InsertUpdate_Data(tbl_AnnualIncomeProp Objtbl_AnnualIncomeProp)
        {
            int        _RetVal      = 0;
            SqlCommand cmdToExecute = new SqlCommand();

            cmdToExecute.CommandText = "InsertUpdate_tbl_AnnualIncome";
            cmdToExecute.CommandType = CommandType.StoredProcedure;

            // Use base class' connection object
            cmdToExecute.Connection = objdb.objConnection;

            try
            {
                //Database DB = DatabaseFactory.CreateDatabase("AppConAnant");
                //DbCommand DBCmd = DB.GetStoredProcCommand("InsertUpdate_tbl_AnnualIncome");
                //DB.AddInParameter(DBCmd, "@AnnualIncomeCode", DbType.Int32, Objtbl_AnnualIncomeProp.AnnualIncomeCode);
                //DB.AddInParameter(DBCmd, "@AnnualIncome", DbType.String, Objtbl_AnnualIncomeProp.AnnualIncome);
                //DB.AddOutParameter(DBCmd, "@RetVal", DbType.Int32, 18);
                //DB.ExecuteNonQuery(DBCmd);
                //return Convert.ToInt32(DBCmd.Parameters["@RetVal"].Value);

                objdb.GetConnStr();
                cmdToExecute.Parameters.Add(new SqlParameter("@AnnualIncomeCode", SqlDbType.Int, 20, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_AnnualIncomeProp.AnnualIncomeCode));
                cmdToExecute.Parameters.Add(new SqlParameter("@AnnualIncome", SqlDbType.NVarChar, 100, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_AnnualIncomeProp.AnnualIncome));
                cmdToExecute.Parameters.Add(new SqlParameter("@RetVal", SqlDbType.Int, 18, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Proposed, _RetVal));

                cmdToExecute.ExecuteNonQuery();

                string ErrorCode = cmdToExecute.Parameters["@RetVal"].Value.ToString();
                _RetVal = Convert.ToInt32(ErrorCode);

                return(_RetVal);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public DataSet Select_Data(tbl_AnnualIncomeProp Objtbl_AnnualIncomeProp, ref int PageCount, int AnnualIncomeCode)
 {
     try
     {
         if (Objtbl_AnnualIncomeProp.AnnualIncomeCode != 0)
         {
             Objtbl_AnnualIncomeProp.PageNo      = 1;
             Objtbl_AnnualIncomeProp.RecordCount = 1;
         }
         int RecordCount = 0;
         tbl_AnnualIncomeDAL Objtbl_AnnualIncomeDAL = new tbl_AnnualIncomeDAL();
         DataSet             dsData = Objtbl_AnnualIncomeDAL.Select_Data(Objtbl_AnnualIncomeProp, ref RecordCount, AnnualIncomeCode);
         Objtbl_AnnualIncomeProp.RecordCount = dsData.Tables[0].Rows.Count;
         double Page = Convert.ToDouble(RecordCount) / Convert.ToDouble(Objtbl_AnnualIncomeProp.RecordCount);
         if (dsData.Tables[0].Rows.Count > 0)
         {
             string[] PageDecimal = Page.ToString("0.00").Split('.');
             if (PageDecimal.Length > 1 && Convert.ToInt32(PageDecimal[1]) > 0)
             {
                 PageCount = Convert.ToInt32(Page.ToString().Split('.')[0]) + 1;
             }
             else
             {
                 PageCount = Convert.ToInt32(Page);
             }
         }
         else
         {
             PageCount = 0;
         }
         return(dsData);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }