public bool GetStudentCourse(int cId, int SId) { try { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@courseID", cId), new SqlParameter("@studentID", SId), }; using (DataTable table1 = SqlDBHelper.ExecuteParamerizedSelectCommand("GetStudentCourse", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table1.Rows.Count > 0) { return(true); } else { return(false); } } } catch { throw; } }
public List <VwAPIRuleApplicationSummary> vwAPIRuleApplicationSummaryLoadByRunID(long RunID) { List <VwAPIRuleApplicationSummary> list = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@RunID", RunID) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_vwAPIRuleApplicationSummary_GetResultByRunID", CommandType.StoredProcedure, parameters)) { if (table.Rows.Count > 0) { list = new List <VwAPIRuleApplicationSummary>(); foreach (DataRow row in table.Rows) { VwAPIRuleApplicationSummary _rule = new VwAPIRuleApplicationSummary(); _rule.FileName = Convert.ToString(row["RuleName"]); _rule.FieldValue = Convert.ToString(row["FieldValue"]); list.Add(_rule); } } } return(list); }
internal DataTable getCustomers(object[] data) { string customerId = "", searchKey = ""; try { customerId = Convert.ToString(data[0]); } catch { customerId = null; } try { searchKey = Convert.ToString(data[1]); } catch { } parameters = new SqlParameter[] { new SqlParameter("@pCustomerId", customerId), new SqlParameter("@pSearchKey", searchKey) }; DataTable table = new DataTable(); try { table = SqlDBHelper.ExecuteParamerizedSelectCommand("app_GetCustomers", CommandType.StoredProcedure, parameters); } catch (Exception ex) { } return(table); }
public Configuration GetConfigValue(string configKey) { Configuration _config = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ConfigurationKey", configKey) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_Configuration_LoadByKey", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table.Rows.Count == 1) { DataRow row = table.Rows[0]; _config = new Configuration(); _config.ID = Convert.ToInt32(row["ID"]); _config.ConfigurationKey = row["ConfigurationKey"].ToString(); _config.ConfigurationValue = row["ConfigurationValue"].ToString(); _config.ConfigurationType = row["ConfigurationType"].ToString(); _config.IsActive = Convert.ToBoolean(row["IsActive"]); _config.Comment = Convert.ToString(row["Comment"]); _config.EntryDate = Convert.ToDateTime(row["EntryDate"]); _config.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"]); } } return(_config); }
internal DataTable GetCustomerForChallan(object[] data) { string action = "", customerId = ""; try { action = Convert.ToString(data[0]); } catch { } try { customerId = Convert.ToString(data[1]); } catch { customerId = "0"; } parameters = new SqlParameter[] { new SqlParameter("@pAction", action), new SqlParameter("@pCustomerId", customerId) }; DataTable table = new DataTable(); try { table = SqlDBHelper.ExecuteParamerizedSelectCommand("app_GetCustomersForDdl", CommandType.StoredProcedure, parameters); } catch (Exception ex) { } return(table); }
public RuleMast GetRuleMastDetails(int ID) { RuleMast _rule = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ID", ID) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_RuleMast_LoadByPK", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table.Rows.Count == 1) { DataRow row = table.Rows[0]; _rule = new RuleMast(); _rule.ID = Convert.ToInt32(row["ID"]); _rule.RuleName = row["RuleName"].ToString(); _rule.CreateDate = Convert.ToDateTime(row["CreateDate"]); _rule.IsActive = Convert.ToBoolean(row["IsActive"]); _rule.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"]); } } return(_rule); }
public List <ClassMaster> GetClassMasterListByClassName(string className) { List <ClassMaster> list = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ClassName", className) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_ClassMaster_GetAllByClassName", CommandType.StoredProcedure, parameters)) { if (table.Rows.Count > 0) { list = new List <ClassMaster>(); foreach (DataRow row in table.Rows) { ClassMaster _clsMstr = new ClassMaster(); _clsMstr.ID = Convert.ToInt32(row["ID"]); _clsMstr.Class = row["Class"].ToString(); _clsMstr.Full_Description = row["Full_Description"].ToString(); list.Add(_clsMstr); } } } return(list); }
public Teacher GetTeacherDetails(Teacher user1) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@email", user1.email), new SqlParameter("@password", user1.password) }; //Lets get the list of all employees in a datataable using (DataTable table1 = SqlDBHelper.ExecuteParamerizedSelectCommand("GetTeacherDetails", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table1.Rows.Count > 0) { //Lets go ahead and create the list of employees //Now lets populate the employee details into the list of employees foreach (DataRow row in table1.Rows) { user1.teacherID = Convert.ToInt32(row["teacherID"]); user1.teacherName = row["fullName"].ToString(); user1.email = row["email"].ToString(); user1.password = row["password"].ToString(); } } } return(user1); }
public List <RuleEngineDetails> GetByRuleMastID(long RuleMastID) { List <RuleEngineDetails> list = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@RuleMastID", RuleMastID) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_RuleEngine_LoadByRuleMastID", CommandType.StoredProcedure, parameters)) { if (table.Rows.Count > 0) { list = new List <RuleEngineDetails>(); foreach (DataRow row in table.Rows) { RuleEngineDetails _rule = new RuleEngineDetails(); _rule.RuleDescID = Convert.ToString(row["RuleDescID"]); list.Add(_rule); } } } return(list); }
public Employee GetEmployeeDetails(int empID) { Employee employee = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@empId", empID) }; //Lets get the list of all employees in a datataable using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("GetEmployeeDetails", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table.Rows.Count == 1) { DataRow row = table.Rows[0]; //Lets go ahead and create the list of employees employee = new Employee(); //Now lets populate the employee details into the list of employees employee.EmployeeID = Convert.ToInt32(row["EmployeeID"]); employee.LastName = row["LastName"].ToString(); employee.FirstName = row["FirstName"].ToString(); employee.Title = row["Title"].ToString(); employee.Address = row["Address"].ToString(); employee.City = row["City"].ToString(); employee.Region = row["Region"].ToString(); employee.PostalCode = row["PostalCode"].ToString(); employee.Country = row["Country"].ToString(); employee.Extension = row["Extension"].ToString(); } } return(employee); }
public UserMaster GetUserDetails(int ID) { UserMaster _user = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ID", ID) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_UserMaster_LoadByPK", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table.Rows.Count == 1) { DataRow row = table.Rows[0]; _user = new UserMaster(); _user.ID = Convert.ToInt32(row["ID"]); _user.UserName = row["UserName"].ToString(); _user.Password = row["Password"].ToString(); _user.IsActive = Convert.ToBoolean(row["IsActive"]); _user.FirstName = row["FirstName"].ToString(); _user.LastName = row["LastName"].ToString(); _user.IsAdmin = Convert.ToBoolean(row["IsAdmin"]); _user.EmailId = row["EmailId"].ToString(); _user.CreatedDate = Convert.ToDateTime(row["CreatedDate"]); _user.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"]); _user.LastLoginDatetime = Convert.ToDateTime(row["LastLoginDatetime"]); _user.LoginDatetime = Convert.ToDateTime(row["LoginDatetime"]); } } return(_user); }
public List <Notice> GetNotice(int NId) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@courseID", NId) }; List <Notice> listNotice = null; //Lets get the list of all employees in a datataable using (DataTable table1 = SqlDBHelper.ExecuteParamerizedSelectCommand("GetNotice", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table1.Rows.Count > 0) { //Lets go ahead and create the list of employees listNotice = new List <Notice>(); //Now lets populate the employee details into the list of employees foreach (DataRow row in table1.Rows) { Notice course = new Notice(); course.notice = row["notice"].ToString(); course.date = row["date"].ToString(); listNotice.Add(course); } } } return(listNotice); }
public vwQuoteDetails GetQuotesByID(int ID) { vwQuoteDetails _quote = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ID", ID) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_vwQuoteDetails_LoadByID", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table.Rows.Count == 1) { DataRow row = table.Rows[0]; _quote = new vwQuoteDetails(); _quote.ID = Convert.ToInt32(row["ID"]); _quote.Mailing_Address1 = Convert.ToString(row["Mailing_Address1"]); _quote.Mailing_Address2 = Convert.ToString(row["Mailing_Address2"]); _quote.ZipCode = Convert.ToInt32(row["ZipCode"]); _quote.City = Convert.ToString(row["City"]); _quote.Insured_State_ID = Convert.ToInt32(row["Insured_State_ID"]); _quote.Home_State_ID = Convert.ToInt32(row["Home_State_ID"]); _quote.Is_new_business = Convert.ToBoolean(row["Is_new_business"]); _quote.Years_Without_Loss = Convert.ToInt32(row["Years_Without_Loss"]); _quote.Effective_Date = Convert.ToDateTime(row["Effective_Date"]); _quote.Expiration_Date = Convert.ToDateTime(row["Expiration_Date"]); _quote.LOB_GeneralLiability = Convert.ToBoolean(row["LOB_GeneralLiability"]); _quote.LOB_VacantBuildingGL = Convert.ToBoolean(row["LOB_VacantBuildingGL"]); _quote.LOB_Owners = Convert.ToBoolean(row["LOB_Owners"]); _quote.LOB_SpecialEvent = Convert.ToBoolean(row["LOB_SpecialEvent"]); _quote.LOB_Property = Convert.ToBoolean(row["LOB_Property"]); _quote.LOB_VacantBuildingProperty = Convert.ToBoolean(row["LOB_VacantBuildingProperty"]); _quote.LOB_BuilderRisk = Convert.ToBoolean(row["LOB_BuilderRisk"]); _quote.LOB_Crime = Convert.ToBoolean(row["LOB_Crime"]); _quote.LOB_InlandMarine = Convert.ToBoolean(row["LOB_InlandMarine"]); _quote.LOB_ContractorsEquipment = Convert.ToBoolean(row["LOB_ContractorsEquipment"]); _quote.LOB_MotorTruck = Convert.ToBoolean(row["LOB_MotorTruck"]); _quote.UserID = Convert.ToInt32(row["UserID"]); _quote.QuoteStatus = Convert.ToString(row["QuoteStatus"]); _quote.HomeStateName = Convert.ToString(row["HomeStateName"]); _quote.InsureStateName = Convert.ToString(row["InsureStateName"]); _quote.QuoteNo = Convert.ToString(row["QuoteNo"]); _quote.FullName = Convert.ToString(row["FullName"]); _quote.FirstName = Convert.ToString(row["FirstName"]); _quote.LastName = Convert.ToString(row["LastName"]); _quote.Insured_Name = Convert.ToString(row["Insured_Name"]); //_quote.Home_State_ID= Convert.ToInt32(row["Home_State_ID"]); //_quote.Insured_State_ID= Convert.ToInt32(row["Insured_State_ID"]); } } return(_quote); }
public DataTable GetResultByRunID(long RunID) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@RunID", RunID) }; DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_vwAPIRuleApplicationSummary_GetResultByRunID", CommandType.StoredProcedure, parameters); return(table); }
public List <RuleDesc> GetRuleDescDetailsByIDs(string IDs) { List <RuleDesc> list = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@IDs", IDs) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_RuleDesc_LoadByIDs", CommandType.StoredProcedure, parameters)) { if (table.Rows.Count > 0) { list = new List <RuleDesc>(); foreach (DataRow row in table.Rows) { RuleDesc _rule = new RuleDesc(); // DataRow row = table.Rows[0]; _rule = new RuleDesc(); _rule.ID = Convert.ToInt32(row["ID"]); _rule.RuleName = row["RuleName"].ToString(); _rule.EntryDate = Convert.ToDateTime(row["EntryDate"]); _rule.IsActive = Convert.ToBoolean(row["IsActive"]); _rule.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"]); _rule.RuleMastID = Convert.ToInt32(row["RuleMastID"]); _rule.SplitAs = Convert.ToString(row["SplitAs"]); _rule.Dictionary = Convert.ToString(row["Dictionary"]); _rule.OriginalDocumentName = Convert.ToString(row["OriginalDocumentName"]); _rule.ConvertedDocumentName = Convert.ToString(row["ConvertedDocumentName"]); _rule.NeighbourhoodCount = Convert.ToInt32(row["NeighbourhoodCount"]); _rule.ContextWord = Convert.ToString(row["ContextWord"]); _rule.Operator = Convert.ToString(row["Operator"]); _rule.FieldName = Convert.ToString(row["FieldName"]); _rule.FieldValue = Convert.ToString(row["FieldValue"]); _rule.Expression1 = Convert.ToString(row["Expression1"]); _rule.Expression2 = Convert.ToString(row["Expression2"]); _rule.ExpressionContext = Convert.ToString(row["ExpressionContext"]); _rule.IsIgnoreKeyword = Convert.ToBoolean(row["IsIgnoreKeyword"]); _rule.IsCheckSynonyms = Convert.ToBoolean(row["IsCheckSynonyms"]); _rule.FieldPosition = Convert.ToString(row["FieldPosition"]); _rule.Synonyms = Convert.ToString(row["Synonyms"]); list.Add(_rule); } } } return(list); }
public vwProperty GetDetailsByQuoteNo(string quoteNo) { vwProperty _Property = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@QuoteNo", quoteNo) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_vwProperty_GetAllByQuoteID", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table.Rows.Count == 1) { DataRow row = table.Rows[0]; _Property = new vwProperty(); _Property.ID = Convert.ToInt32(row["ID"]); _Property.QuoteID = Convert.ToInt32(row["QuoteID"]); _Property.Address1 = Convert.ToString(row["Address1"]); _Property.Address2 = Convert.ToString(row["Address2"]); _Property.Zip = Convert.ToInt32(row["Zip"]); _Property.City = Convert.ToString(row["City"]); _Property.StateID = Convert.ToInt32(row["StateID"]); _Property.ProtectionClass = Convert.ToInt32(row["ProtectionClass"]); _Property.ClassID = Convert.ToInt32(row["ClassID"]); _Property.StructureDescription = Convert.ToString(row["StructureDescription"]); _Property.ConstructionType = Convert.ToString(row["ConstructionType"]); _Property.ConstType_ApplySpriniderSafeguardP1 = Convert.ToBoolean(row["ConstType_ApplySpriniderSafeguardP1"]); _Property.ConstType_ExcludeWindHall = Convert.ToBoolean(row["ConstType_ExcludeWindHall"]); _Property.HigherWindHall = Convert.ToString(row["HigherWindHall"]); _Property.YearBuilt = Convert.ToInt32(row["YearBuilt"]); _Property.LastCompleteUpdateYear = Convert.ToInt32(row["LastCompleteUpdateYear"]); _Property.Plumbing = Convert.ToString(row["Plumbing"]); _Property.Rooting = Convert.ToString(row["Rooting"]); _Property.Wiring = Convert.ToString(row["Wiring"]); _Property.Coverage_Building = Convert.ToBoolean(row["Coverage_Building"]); _Property.Coverage_BusinessPersonalProperty = Convert.ToBoolean(row["Coverage_BusinessPersonalProperty"]); _Property.Coverage_BusinessIncome = Convert.ToBoolean(row["Coverage_BusinessIncome"]); _Property.Coverage_PersonalPropertyofOthers = Convert.ToBoolean(row["Coverage_PersonalPropertyofOthers"]); _Property.Coverage_Signs = Convert.ToBoolean(row["Coverage_Signs"]); _Property.Coverage_PropertyInOpen = Convert.ToBoolean(row["Coverage_PropertyInOpen"]); _Property.Class = Convert.ToString(row["Class"]); _Property.Full_Description = Convert.ToString(row["Full_Description"]); _Property.Insured_Name = Convert.ToString(row["Insured_Name"]); _Property.QuoteNo = Convert.ToString(row["QuoteNo"]); _Property.QuoteStatus = Convert.ToString(row["QuoteStatus"]); _Property.StateName = Convert.ToString(row["StateName"]); } } return(_Property); }
public List <vwClassDetails> GetClassMasterListByQuoteID(int quoteID) { List <vwClassDetails> list = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@QuoteID", quoteID) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_vwClassDetails_GetAllByQuoteID", CommandType.StoredProcedure, parameters)) { if (table.Rows.Count > 0) { list = new List <vwClassDetails>(); foreach (DataRow row in table.Rows) { vwClassDetails _clsDtls = new vwClassDetails(); _clsDtls.ID = Convert.ToInt32(row["ID"]); _clsDtls.Class = row["Class"].ToString(); _clsDtls.Full_Description = row["Full_Description"].ToString(); _clsDtls.Zip = Convert.ToInt32(row["Zip"]); _clsDtls.Quote_ID = Convert.ToInt32(row["Quote_ID"]); _clsDtls.StateID = Convert.ToInt32(row["StateID"]); _clsDtls.Territory = row["Territory"].ToString(); _clsDtls.ClassID = Convert.ToInt32(row["ClassID"]); _clsDtls.Exposure = Convert.ToInt32(row["Exposure"]); _clsDtls.Cov_Premises = Convert.ToBoolean(row["Cov_Premises"]); _clsDtls.Cov_Product = Convert.ToBoolean(row["Cov_Product"]); _clsDtls.Territory_ID = Convert.ToInt32(row["Territory_ID"]); _clsDtls.TerritoryDetails = row["TerritoryDetails"].ToString(); _clsDtls.TerritoryType = row["TerritoryType"].ToString(); _clsDtls.Insured_Name = row["Insured_Name"].ToString(); _clsDtls.Mailing_Address1 = row["Mailing_Address1"].ToString(); _clsDtls.Mailing_Address2 = row["Mailing_Address2"].ToString(); _clsDtls.ZipCode = Convert.ToInt32(row["ZipCode"]); _clsDtls.City = row["City"].ToString(); _clsDtls.Insured_State_ID = Convert.ToInt32(row["Insured_State_ID"]); _clsDtls.Home_State_ID = Convert.ToInt32(row["Home_State_ID"]); _clsDtls.Is_new_business = Convert.ToBoolean(row["Is_new_business"]); _clsDtls.Years_Without_Loss = Convert.ToInt32(row["Years_Without_Loss"]); _clsDtls.Effective_Date = Convert.ToDateTime(row["Effective_Date"]); _clsDtls.Expiration_Date = Convert.ToDateTime(row["Expiration_Date"]); _clsDtls.UserID = Convert.ToInt32(row["UserID"]); _clsDtls.QuoteStatus = row["QuoteStatus"].ToString(); _clsDtls.QuoteNo = row["QuoteNo"].ToString(); list.Add(_clsDtls); } } } return(list); }
public DataTable GetDateWiseSuccessFailure(DateTime RunDate) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@RunDate", RunDate) }; DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_RuleApplicationSummary_GetDateWiseSuccessFailure", CommandType.StoredProcedure, parameters); return(table); }
public RuleDesc GetRuleDescDetails(int ID) { RuleDesc _rule = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ID", ID) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_RuleDesc_LoadByPK", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table.Rows.Count == 1) { DataRow row = table.Rows[0]; _rule = new RuleDesc(); _rule.ID = Convert.ToInt32(row["ID"]); _rule.RuleName = row["RuleName"].ToString(); _rule.EntryDate = Convert.ToDateTime(row["EntryDate"]); _rule.IsActive = Convert.ToBoolean(row["IsActive"]); _rule.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"]); _rule.RuleMastID = Convert.ToInt32(row["RuleMastID"]); _rule.SplitAs = Convert.ToString(row["SplitAs"]); _rule.Dictionary = Convert.ToString(row["Dictionary"]); _rule.OriginalDocumentName = Convert.ToString(row["OriginalDocumentName"]); _rule.ConvertedDocumentName = Convert.ToString(row["ConvertedDocumentName"]); _rule.NeighbourhoodCount = Convert.ToInt32(row["NeighbourhoodCount"]); _rule.ContextWord = Convert.ToString(row["ContextWord"]); _rule.Operator = Convert.ToString(row["Operator"]); _rule.FieldName = Convert.ToString(row["FieldName"]); _rule.FieldValue = Convert.ToString(row["FieldValue"]); _rule.Expression1 = Convert.ToString(row["Expression1"]); _rule.Expression2 = Convert.ToString(row["Expression2"]); _rule.ExpressionContext = Convert.ToString(row["ExpressionContext"]); _rule.IsIgnoreKeyword = Convert.ToBoolean(row["IsIgnoreKeyword"]); _rule.IsCheckSynonyms = Convert.ToBoolean(row["IsCheckSynonyms"]); _rule.FieldPosition = Convert.ToString(row["FieldPosition"]); _rule.Synonyms = Convert.ToString(row["Synonyms"]); _rule.AllSynonyms = Convert.ToString(row["AllSynonyms"]); } } return(_rule); }
internal DataTable getMaterialsForExcel() { DataTable table = new DataTable(); parameters = new SqlParameter[] { }; try { table = SqlDBHelper.ExecuteParamerizedSelectCommand("app_GetMaterialsForExcel", CommandType.StoredProcedure, parameters); } catch (Exception ex) { } return(table); }
internal System.Data.DataTable getLastWeekCollection() { DataTable table = new DataTable(); parameters = new SqlParameter[] { }; try { table = SqlDBHelper.ExecuteParamerizedSelectCommand("app_GetLastWeekCollection", CommandType.StoredProcedure, parameters); } catch (Exception ex) { } return(table); }
public bool GetAuthorityPassword(string p) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@password", p) }; using (DataTable table1 = SqlDBHelper.ExecuteParamerizedSelectCommand("GetPassword", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table1.Rows.Count > 0) { return(true); } else { return(false); } } }
public List <vwRuleEngine> GetByRuleMastID(long RuleMastID) { List <vwRuleEngine> list = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@RuleMastID", RuleMastID) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_VwRuleEngine_LoadByRuleMastID", CommandType.StoredProcedure, parameters)) { if (table.Rows.Count > 0) { list = new List <vwRuleEngine>(); foreach (DataRow row in table.Rows) { vwRuleEngine _rule = new vwRuleEngine(); //_rule.ID = Convert.ToInt32(row["ID"]); _rule.RuleMastID = Convert.ToInt32(row["RuleMastID"]); //_rule.RuleDescID = Convert.ToString(row["RuleDescID"]); _rule.FolderPath = Convert.ToString(row["FolderPath"]); _rule.CreateDate = Convert.ToDateTime(row["CreateDate"]); _rule.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"]); _rule.IsActive = Convert.ToBoolean(row["IsActive"]); _rule.RuleMastName = Convert.ToString(row["RuleMastName"]); list.Add(_rule); } } } return(list); }
public List <StudentCourseList> GetStudentList(int NId) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@courseID", NId) }; List <StudentCourseList> user = null; //Lets get the list of all employees in a datataable using (DataTable table1 = SqlDBHelper.ExecuteParamerizedSelectCommand("GetStudentList", CommandType.StoredProcedure, parameters)) { user = new List <StudentCourseList>(); //check if any record exist or not if (table1.Rows.Count > 0) { //Lets go ahead and create the list of employees //Now lets populate the employee details into the list of employees foreach (DataRow row in table1.Rows) { StudentCourseList course = new StudentCourseList(); course.studentID = Convert.ToInt32(row["studentID"]); course.studentName = row["fullName"].ToString();; course.idNumber = row["IdNumber"].ToString(); course.email = row["email"].ToString(); course.password = row["password"].ToString(); course.courseID = NId; user.Add(course); } } } return(user); }
public bool VerifyAdmin(LoginDAL course) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@password", course.password), new SqlParameter("@email", course.email) }; using (DataTable table1 = SqlDBHelper.ExecuteParamerizedSelectCommand("GetTeacherUser", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table1.Rows.Count > 0) { return(true); } else { return(false); } } }
public bool QuizStat(int ccid) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@courseID", ccid), new SqlParameter("@setq", "1"), }; using (DataTable table1 = SqlDBHelper.ExecuteParamerizedSelectCommand("QuizStat", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table1.Rows.Count > 0) { return(true); } else { return(false); } } }
public LimitDetails GetLimitByQuoteID(int quoteID) { LimitDetails _limit = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@QuoteID", quoteID) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_LimitDetails_LoadByQuoteID", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table.Rows.Count == 1) { DataRow row = table.Rows[0]; _limit = new LimitDetails(); _limit.ID = Convert.ToInt32(row["ID"]); _limit.Quote_ID = Convert.ToInt32(row["Quote_ID"]); _limit.EachOccurence = Convert.ToString(row["EachOccurence"]); _limit.GeneralAggregate = Convert.ToString(row["GeneralAggregate"]); _limit.PremisesDamage = Convert.ToString(row["PremisesDamage"]); _limit.PremisesDamage = Convert.ToString(row["PremisesDamage"]); _limit.MedicalExpense = Convert.ToString(row["MedicalExpense"]); _limit.ProductCompleted = Convert.ToString(row["ProductCompleted"]); _limit.DeductablePerClaim = Convert.ToString(row["DeductablePerClaim"]); _limit.PersonalInjury = Convert.ToString(row["PersonalInjury"]); } } return(_limit); }
public List <RuleApplicationSummary> RuleApplicationSummary_LoadByRunID(long RunID) { List <RuleApplicationSummary> list = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@RunID", RunID) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_RuleApplicationSummary_LoadByRunID", CommandType.StoredProcedure, parameters)) { if (table.Rows.Count > 0) { list = new List <RuleApplicationSummary>(); foreach (DataRow row in table.Rows) { RuleApplicationSummary _rule = new RuleApplicationSummary(); _rule.RunID = Convert.ToInt32(row["RunID"]); _rule.FileName = Convert.ToString(row["FileName"]); _rule.FieldValue = Convert.ToString(row["FieldValue"]); _rule.EntryDate = Convert.ToDateTime(row["EntryDate"]); _rule.IsSuccess = Convert.ToBoolean(row["IsSuccess"]); list.Add(_rule); } } } return(list); }
public List <Discussion> GetDiscussion(int NId) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@courseID", NId) }; List <Discussion> listDiscussion = null; //Lets get the list of all employees in a datataable using (DataTable table1 = SqlDBHelper.ExecuteParamerizedSelectCommand("GetDiscussion", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table1.Rows.Count > 0) { //Lets go ahead and create the list of employees listDiscussion = new List <Discussion>(); //Now lets populate the employee details into the list of employees foreach (DataRow row in table1.Rows) { Discussion course = new Discussion(); course.name = row["Name"].ToString(); course.courseID = Convert.ToInt32(row["courseID"]); course.post = row["post"].ToString(); course.email = row["email"].ToString(); listDiscussion.Add(course); } } } return(listDiscussion); }
public bool GetCourseDetails(int cid, string ek) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@courseID", cid), new SqlParameter("@ek", ek), }; //Lets get the list of all employees in a datataable using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("GetCourseDetails", CommandType.StoredProcedure, parameters)) { //check if any record exist or not if (table.Rows.Count > 0) { return(true); } else { return(false); } } }