本文整理汇总了C#中CollegeERPDBEntities类的典型用法代码示例。如果您正苦于以下问题:C# CollegeERPDBEntities类的具体用法?C# CollegeERPDBEntities怎么用?C# CollegeERPDBEntities使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CollegeERPDBEntities类属于命名空间,在下文中一共展示了CollegeERPDBEntities类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getprogramslist
public List<Program_tbl> getprogramslist()
{
db = new CollegeERPDBEntities();
var programs = db.Program_tbl.ToList();
return programs;
}
示例2: AddQuestionare
public void AddQuestionare(int UserID)
{
db = new CollegeERPDBEntities();
AdminMails_tbl obj = new AdminMails_tbl {SenderID=UserID,Message="<a href=DownloadReport.aspx?senderid='"+UserID+"'>Download Questionair</a>",Subject="SuggestionRequest",Status=0,Date=DateTime.Now.Date};
db.AdminMails_tbl.Add(obj);
db.SaveChanges();
}
示例3: getformSectionlist
public List<FormSections_tbl> getformSectionlist()
{
using (db = new CollegeERPDBEntities())
{
var Sections = db.FormSections_tbl.ToList();
return Sections;
}
}
示例4: LoginChek
public Candidate_tbl LoginChek(string username, string password)
{
db = new CollegeERPDBEntities();
var candidate = db.Candidate_tbl.Where(x => x.Username == username && x.Password == password).FirstOrDefault();
return candidate;
}
示例5: AddRegistrationNotice
public void AddRegistrationNotice(Mails_tbl t)
{
db = new CollegeERPDBEntities();
db.Mails_tbl.Add(t);
db.SaveChanges();
}
示例6: AddCandidate
public int AddCandidate(Candidate_tbl candidate)
{
db = new CollegeERPDBEntities();
db.Candidate_tbl.Add(candidate);
db.SaveChanges();
return candidate.ID;
}
示例7: addQuestion
public void addQuestion(string Question,string[] answers)
{
using (db = new CollegeERPDBEntities())
{
Questionaire_tbl qstn = new Questionaire_tbl { Question = Question };
db.Questionaire_tbl.Add(qstn);
db.SaveChanges();
foreach (string ans in answers)
{
Answers_tbl anss = new Answers_tbl { Q_ID = qstn.Q_ID, Answer = ans };
db.Answers_tbl.Add(anss);
db.SaveChanges();
}
}
}
示例8: addFormField
public void addFormField(Forms_tbl form,string [] options)
{
using (db = new CollegeERPDBEntities())
{
db.Forms_tbl.Add(form);
db.SaveChanges();
if(form.FormControl!="Text")
{
foreach (string option in options)
db.ControlOptions_tbl.Add(new ControlOptions_tbl { FieldID=form.ID,optionvalue=option});
}
db.SaveChanges();
}
}
示例9: getresult
public List<Results_tbl> getresult(int stdid,string term)
{
db = new CollegeERPDBEntities();
var metricno=db.AddmissionList_tbl.Where(x=>x.UserID==stdid).FirstOrDefault().MetricNo;
string year = DateTime.Now.Year.ToString();
return db.Results_tbl.Where(x => x.MetricNo == metricno && x.Year==year && x.ExamType==term).ToList();
}
示例10: updatestudtent
//txtHomeaddress.Text, int.Parse(dropdownSto.SelectedValue),int.Parse(dropdownLocalGovtarea.SelectedValue),Emailtxt.Text,dropdownDay.SelectedItem.Text + "-" + dropdownMonth.SelectedItem.Text + "-" + dropdownyears.SelectedItem.Text,Phonetxt.Text
public void updatestudtent(int stdid,string Name,int prid,int semester,string feediscount,string address,int sto,int area,string email,string dob,string phone)
{
db = new CollegeERPDBEntities();
var student= db.StudentInfo_tbl.Where(x=>x.UserId==stdid).FirstOrDefault();
student.ProgramID = prid;
student.Semester = semester;
student.FeeDiscount = feediscount;
student.Candidate_tbl.Name = Name;
student.Candidate_tbl.ProgrammeID = prid;
student.Candidate_tbl.HomeAdress = address;
student.Candidate_tbl.LocalGovtArea = area;
student.Candidate_tbl.Stateoforigin = sto;
student.Candidate_tbl.Email = email;
student.Candidate_tbl.Phone = phone;
student.Candidate_tbl.DateofBirth = dob;
db.SaveChanges();
}
示例11: addresults
public int addresults(Results_tbl result)
{
db = new CollegeERPDBEntities();
db.Results_tbl.Add(result);
db.SaveChanges();
return result.ID;
}
示例12: getbooklist
public List<Book> getbooklist(int page, int pagesize)
{
db = new CollegeERPDBEntities();
List<Book> temp = db.Books.OrderBy(x=>x.ID).Skip(page*pagesize).Take(pagesize).ToList();
// var course = db.Courses_tbl.Where(x => x.ID>=pageStart && x.ID<=pageEnd).FirstOrDefault();
return temp;
}
示例13: getusermail
public Mails_tbl getusermail(int mid)
{
db = new CollegeERPDBEntities();
var mail = db.Mails_tbl.Where(x => x.ID == mid).FirstOrDefault();
mail.Status = 1;
db.SaveChanges();
return mail;
}
示例14: getattdance_course
public List<Attendance_tbl> getattdance_course(int courseid)
{
db = new CollegeERPDBEntities();
return db.Attendance_tbl.Where(x => x.CourseID == courseid).ToList();
}
示例15: placeOrder
public void placeOrder(IssueBook book)
{
using (db = new CollegeERPDBEntities())
{
db.IssueBooks.Add(book);
db.SaveChanges();
AdminMails_tbl amail = new AdminMails_tbl { SenderID = book.LibraryMember.UserID, Message = book.LibraryMember.Candidate_tbl.Name + " has Requested for " + book.Book.Title, Date = DateTime.Now.Date, Subject = "Book Request", Status = 0 };
addadminmail(amail);
}
}