예제 #1
0
        public JsonResult student_submit_choice_filling(ChoiceFilling obj)
        {
            ChoiceFillingRepository objRep = new ChoiceFillingRepository();
            //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;

            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
                        ));
        }
예제 #2
0
        public JsonResult student_submit_choice_filling(ChoiceFilling obj)
        {
            ChoiceFillingRepository objRep = new ChoiceFillingRepository();
            //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
                        ));
        }