public JsonResult UpdateSequenceNumber_swap_move(ChoiceFillingSecondRound obj) { ChoiceFillingSecondRoundRepository objRep = new ChoiceFillingSecondRoundRepository(); //obj.Type = "SWAP"; string localIP = "?"; localIP = Request.ServerVariables["REMOTE_ADDR"].ToString(); obj.CreatedIp = localIP; obj.studentid = Session["studentid"].ToString(); DataSet _ds = objRep.UpdateSequenceNumber_swap_move(obj); bool flag = true; if (_ds != null) { if (_ds.Tables[0].Rows.Count > 0) { if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "0") { flag = false; } } } return(Json(new { flag = flag }, JsonRequestBehavior.AllowGet )); }
public JsonResult Insert_InstituteList(ChoiceFillingSecondRound _obj) { ChoiceFillingSecondRoundRepository objRep = new ChoiceFillingSecondRoundRepository(); _obj.studentid = Session["studentid"].ToString(); _obj.CreatedBy = Session["studentid"].ToString(); _obj.CreatedIp = Session["localIP"].ToString(); DataSet _ds = objRep.Insert_InstituteList_New(_obj); bool flag = true; if (_ds != null) { if (_ds.Tables[0].Rows.Count > 0) { if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "0") { flag = false; } } } return(Json(new { flag = flag }, JsonRequestBehavior.AllowGet )); }
public JsonResult student_submit_choice_filling(ChoiceFillingSecondRound obj) { ChoiceFillingSecondRoundRepository objRep = new ChoiceFillingSecondRoundRepository(); //obj.Type = "SWAP"; string localIP = "?"; localIP = Request.ServerVariables["REMOTE_ADDR"].ToString(); obj.CreatedIp = localIP; obj.studentid = Session["studentid"].ToString(); DataSet _ds = objRep.student_submit_choice_filling(obj); bool flag = true; SendEmail _objseedemail = new SendEmail(); if (_ds != null) { if (_ds.Tables[0].Rows.Count > 0) { if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "0") { flag = false; } else { string strform = System.Configuration.ConfigurationManager.AppSettings["Emailusername"]; string Subject = "Study in India"; StringBuilder MailBody = new StringBuilder(); MailBody.Append("<br/>Dear Candidate, " + Session["studentname"].ToString() + ",<br/>"); MailBody.Append("<br/>Thank you for choosing Study in India!"); MailBody.Append("<br/>You have successfully submitted your choices for institutes."); MailBody.Append("<br/>Results of the counseling will be shared with you shortly."); MailBody.Append("<br/><br/><br/>Best,<br/>"); MailBody.Append("Study in India Team<br/>"); string bcc = ""; string cc = ""; _objseedemail.SendEmailInBackgroundThread(strform, Session["Email"].ToString(), bcc, cc, Subject, MailBody.ToString(), "", true); } } } return(Json(new { flag = flag }, JsonRequestBehavior.AllowGet )); }
public JsonResult SelectInstitute(ChoiceFillingSecondRound obj) { ChoiceFillingSecondRoundRepository objRep = new ChoiceFillingSecondRoundRepository(); obj.Type = "GridDetails"; obj.studentid = Session["studentid"].ToString(); obj.CreatedBy = Session["studentid"].ToString(); DataSet ds = objRep.Select_InstituteList(obj); List <ChoiceFillingSecondRound> _list = new List <ChoiceFillingSecondRound>(); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow row in ds.Tables[0].Rows) { ChoiceFillingSecondRound objChoice = new ChoiceFillingSecondRound(); //objChoice.ID = row["ID"].ToString(); objChoice.tbl_InstituteCourse_ID = row["tbl_InstituteCourse_ID"].ToString(); objChoice.InstituteID = row["InstituteId"].ToString(); //objChoice.Discipline = row["Discipline"].ToString(); objChoice.Natureofcourse = row["Natureofcourse"].ToString(); //objChoice.ProgramLevel = row["ProgramLevel"].ToString(); // objChoice.BranchName = row["BranchName"].ToString(); objChoice.InstituteName = row["InstituteName"].ToString(); // objChoice.DisplayName = row["DisplayName"].ToString(); objChoice.state_name = row["state_name"].ToString(); objChoice.G1SeatWaiver = row["G1SeatWaiver"].ToString(); objChoice.G2SeatWaiver = row["G2SeatWaiver"].ToString(); objChoice.G3SeatWaiver = row["G3SeatWaiver"].ToString(); objChoice.G4SeatWaiver = row["G4SeatWaiver"].ToString(); _list.Add(objChoice); } } } return(Json(new { List = _list }, JsonRequestBehavior.AllowGet )); }
public JsonResult update_StudentChoiceFilling(string ID = "") { bool flag = false; ChoiceFillingSecondRoundRepository objRep = new ChoiceFillingSecondRoundRepository(); DataSet _ds = objRep.update_StudentChoiceFilling(ID, Session["studentid"].ToString()); if (_ds != null) { if (_ds.Tables[0].Rows.Count > 0) { if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "1") { flag = true; } } } return(Json(new { flag = flag }, JsonRequestBehavior.AllowGet )); }
public ActionResult SelectInstitutePaging(ChoiceFillingSecondRound obj) { var draw = Request.Form.GetValues("draw").FirstOrDefault(); var start = Request.Form.GetValues("start").FirstOrDefault(); var length = Request.Form.GetValues("length").FirstOrDefault(); string search = Request.Form.GetValues("search[value]").FirstOrDefault(); // var data=""; int pageSize = length != null?Convert.ToInt32(length) : 0; int skip = start != null?Convert.ToInt32(start) : 0; int recordsTotal = 0; ChoiceFillingSecondRoundRepository objRep = new ChoiceFillingSecondRoundRepository(); obj.Type = "GridDetails"; obj.studentid = Session["studentid"].ToString(); obj.CreatedBy = Session["studentid"].ToString(); List <ChoiceFillingSecondRound> _list = new List <ChoiceFillingSecondRound>(); DataSet ds = objRep.Select_InstituteList(obj); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow row in ds.Tables[0].Rows) { ChoiceFillingSecondRound objChoice = new ChoiceFillingSecondRound(); objChoice.tbl_InstituteCourse_ID = row["tbl_InstituteCourse_ID"].ToString(); objChoice.InstituteID = row["InstituteId"].ToString(); objChoice.Natureofcourse = row["Natureofcourse"].ToString(); objChoice.InstituteName = row["InstituteName"].ToString(); objChoice.state_name = row["state_name"].ToString(); objChoice.G1SeatWaiver = row["G1SeatWaiver"].ToString(); objChoice.G2SeatWaiver = row["G2SeatWaiver"].ToString(); objChoice.G3SeatWaiver = row["G3SeatWaiver"].ToString(); objChoice.G4SeatWaiver = row["G4SeatWaiver"].ToString(); _list.Add(objChoice); } } } List <ChoiceFillingSecondRound> list = new List <ChoiceFillingSecondRound>(); if (search == null) { list = _list; } else { // simulate search foreach (ChoiceFillingSecondRound dataItem in _list) { if (dataItem.InstituteName.ToUpper().Contains(search.ToUpper()) || dataItem.Natureofcourse.ToString().Contains(search.ToUpper())) { list.Add(dataItem); } } } var v = list; recordsTotal = v.Count(); var data = v.Skip(skip).Take(pageSize).ToList(); return(Json(new { draw = draw, recordsFiltered = recordsTotal, recordsTotal = recordsTotal, data = data }, JsonRequestBehavior.AllowGet)); }