public DataSet SelectCombo_Data(tbl_ProfileCreatedByProp Objtbl_ProfileCreatedByProp) { try { tbl_ProfileCreatedByDAL Objtbl_ProfileCreatedByDAL = new tbl_ProfileCreatedByDAL(); return(Objtbl_ProfileCreatedByDAL.SelectCombo_Data(Objtbl_ProfileCreatedByProp)); } catch (Exception ex) { throw ex; } }
public int Delete_Data(tbl_ProfileCreatedByProp Objtbl_ProfileCreatedByProp) { try { tbl_ProfileCreatedByDAL Objtbl_ProfileCreatedByDAL = new tbl_ProfileCreatedByDAL(); return(Objtbl_ProfileCreatedByDAL.Delete_Data(Objtbl_ProfileCreatedByProp)); } catch (Exception ex) { throw ex; } }
public int Delete_Data(tbl_ProfileCreatedByProp Objtbl_ProfileCreatedByProp) { try { //Database DB = DatabaseFactory.CreateDatabase("AppConAnant"); //DbCommand DBCmd = DB.GetStoredProcCommand("Delete_tbl_ProfileCreatedBy"); //DB.AddInParameter(DBCmd, "@ProfileCreatedByCode", DbType.Int32, Objtbl_ProfileCreatedByProp.ProfileCreatedByCode); //return DB.ExecuteNonQuery(DBCmd); return(1); } catch (Exception ex) { throw ex; } }
public DataSet SelectCombo_Data(tbl_ProfileCreatedByProp Objtbl_ProfileCreatedByProp) { try { //Database DB = DatabaseFactory.CreateDatabase("AppConAnant"); //DbCommand DBCmd = DB.GetStoredProcCommand("SelectCombo_tbl_ProfileCreatedBy"); //DB.AddInParameter(DBCmd, "@SearchText", DbType.String, Objtbl_ProfileCreatedByProp.ProfileCreatedBy); //return DB.ExecuteDataSet(DBCmd); return(null); } catch (Exception ex) { throw ex; } }
public DataSet Select_Data(tbl_ProfileCreatedByProp Objtbl_ProfileCreatedByProp, ref int TotalCount, int ProfileCreatedByCode) { try { DataSet dsData = objdb.ExecuteDataset("Select_tbl_ProfileCreatedBy", ProfileCreatedByCode, 1, 100, 0); //Database DB = DatabaseFactory.CreateDatabase("AppConAnant"); //DbCommand DBCmd = DB.GetStoredProcCommand("Select_tbl_ProfileCreatedBy"); //DB.AddInParameter(DBCmd, "@ProfileCreatedByCode", DbType.Int32, Objtbl_ProfileCreatedByProp.ProfileCreatedByCode); //DB.AddInParameter(DBCmd, "@PageNo", DbType.Int32, Objtbl_ProfileCreatedByProp.PageNo); //DB.AddInParameter(DBCmd, "@RecordCount", DbType.Int32, Objtbl_ProfileCreatedByProp.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; } }
public DataSet Select_Data(tbl_ProfileCreatedByProp Objtbl_ProfileCreatedByProp, ref int PageCount, int ProfileCreatedByCode) { try { if (Objtbl_ProfileCreatedByProp.ProfileCreatedByCode != 0) { Objtbl_ProfileCreatedByProp.PageNo = 1; Objtbl_ProfileCreatedByProp.RecordCount = 1; } int RecordCount = 1; tbl_ProfileCreatedByDAL Objtbl_ProfileCreatedByDAL = new tbl_ProfileCreatedByDAL(); DataSet dsData = Objtbl_ProfileCreatedByDAL.Select_Data(Objtbl_ProfileCreatedByProp, ref RecordCount, ProfileCreatedByCode); Objtbl_ProfileCreatedByProp.RecordCount = dsData.Tables[0].Rows.Count; double Page = Convert.ToDouble(RecordCount) / Convert.ToDouble(Objtbl_ProfileCreatedByProp.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; } }
public int InsertUpdate_Data(tbl_ProfileCreatedByProp Objtbl_ProfileCreatedByProp) { try { int _RetVal = 0; SqlCommand cmdToExecute = new SqlCommand(); cmdToExecute.CommandText = "InsertUpdate_tbl_ProfileCreatedBy"; cmdToExecute.CommandType = CommandType.StoredProcedure; // Use base class' connection object cmdToExecute.Connection = objdb.objConnection; //Database DB = DatabaseFactory.CreateDatabase("AppConAnant"); //DbCommand DBCmd = DB.GetStoredProcCommand("InsertUpdate_tbl_ProfileCreatedBy"); //DB.AddInParameter(DBCmd, "@ProfileCreatedByCode", DbType.Int32, Objtbl_ProfileCreatedByProp.ProfileCreatedByCode); //DB.AddInParameter(DBCmd, "@ProfileCreatedBy", DbType.String, Objtbl_ProfileCreatedByProp.ProfileCreatedBy); //DB.AddOutParameter(DBCmd, "@RetVal", DbType.Int32, 18); //DB.ExecuteNonQuery(DBCmd); //return Convert.ToInt32(DBCmd.Parameters["@RetVal"].Value); objdb.GetConnStr(); cmdToExecute.Parameters.Add(new SqlParameter("@ProfileCreatedByCode", SqlDbType.Int, 20, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_ProfileCreatedByProp.ProfileCreatedByCode)); cmdToExecute.Parameters.Add(new SqlParameter("@ProfileCreatedBy", SqlDbType.NVarChar, 100, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, Objtbl_ProfileCreatedByProp.ProfileCreatedBy)); 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; } }