public ActionResult DeleteConfirmed(long id)
        {
            tbl_CSI_69_Con_RegistrationDetails tbl_csi_69_con_registrationdetails = db.tbl_CSI_69_Con_RegistrationDetails.Find(id);

            db.tbl_CSI_69_Con_RegistrationDetails.Remove(tbl_csi_69_con_registrationdetails);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        //
        // GET: /khgfv/Delete/5

        public ActionResult Delete(long id = 0)
        {
            tbl_CSI_69_Con_RegistrationDetails tbl_csi_69_con_registrationdetails = db.tbl_CSI_69_Con_RegistrationDetails.Find(id);

            if (tbl_csi_69_con_registrationdetails == null)
            {
                return(HttpNotFound());
            }
            return(View(tbl_csi_69_con_registrationdetails));
        }
 public ActionResult Edit(tbl_CSI_69_Con_RegistrationDetails tbl_csi_69_con_registrationdetails)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_csi_69_con_registrationdetails).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_csi_69_con_registrationdetails));
 }
        public ActionResult Create(tbl_CSI_69_Con_RegistrationDetails tbl_csi_69_con_registrationdetails)
        {
            if (ModelState.IsValid)
            {
                db.tbl_CSI_69_Con_RegistrationDetails.Add(tbl_csi_69_con_registrationdetails);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tbl_csi_69_con_registrationdetails));
        }
        public ActionResult UploadFiles()
        {
            long id = Convert.ToInt64(TempData["id"]);

            tbl_CSI_69_Con_RegistrationDetails tbl_csi_69_con_registrationdetails = db.tbl_CSI_69_Con_RegistrationDetails.Find(id);

            if (tbl_csi_69_con_registrationdetails == null)
            {
                return(HttpNotFound());
            }

            // Checking no of files injected in Request object
            if (Request.Files.Count > 0)
            {
                try
                {
                    //  Get all files from Request object
                    HttpFileCollectionBase files = Request.Files;
                    for (int i = 0; i < files.Count; i++)
                    {
                        //string path = AppDomain.CurrentDomain.BaseDirectory + "Uploads/";
                        //string filename = Path.GetFileName(Request.Files[i].FileName);

                        HttpPostedFileBase file = files[i];
                        string             fname;

                        // Checking for Internet Explorer
                        if (Request.Browser.Browser.ToUpper() == "IE" || Request.Browser.Browser.ToUpper() == "INTERNETEXPLORER")
                        {
                            string[] testfiles = file.FileName.Split(new char[] { '\\' });
                            fname = tbl_csi_69_con_registrationdetails.Extra3;
                        }
                        else
                        {
                            fname = tbl_csi_69_con_registrationdetails.Extra3;
                        }

                        // Get the complete folder path and store the file inside it.
                        fname = Path.Combine(Server.MapPath("~/Uploads/"), fname);
                        file.SaveAs(fname);
                    }
                    // Returns message that successfully uploaded
                    return(Json("File Uploaded Successfully!"));
                }
                catch (Exception ex)
                {
                    return(Json("Error occurred. Error details: " + ex.Message));
                }
            }
            else
            {
                return(Json("No files selected."));
            }
        }
        public ActionResult Login(tbl_CSI_69_Con_RegistrationDetails tblusermastre, FormCollection form)
        {
            List <ValidateUser_Result> lstUserMaster = db.ValidateUser(tblusermastre.Username, tblusermastre.Password).ToList();

            if (lstUserMaster.Count > 0)
            {
                Session["UserloginId"] = lstUserMaster[0].Username;
                Session["UserId"]      = lstUserMaster[0].RegId;
                long id = Convert.ToInt64(Session["UserId"]);
                return(RedirectToAction("Dashboard", "Home"));
            }
            else
            {
                ModelState.AddModelError("", "The user name or password provided is incorrect.");
                return(View(tblusermastre));
            }
        }
        public ActionResult Edit(long id = 0)
        {
            tbl_CSI_69_Con_RegistrationDetails tbl_csi_69_con_registrationdetails = db.tbl_CSI_69_Con_RegistrationDetails.Find(id);

            if (tbl_csi_69_con_registrationdetails == null)
            {
                return(HttpNotFound());
            }

            ViewBag.cntlist = new SelectList(db.tblCountryCodes, "Country", "Country", tbl_csi_69_con_registrationdetails.Country);

            ViewBag.State = new SelectList(new[] { new { value = "Andaman and Nicobar Islands", Text = "Andaman and Nicobar Islands" }, new { value = "Andhra Pradesh", Text = "Andhra Pradesh" },
                                                   new { value = "Arunachal Pradesh", Text = "Arunachal Pradesh" }, new { value = "Assam", Text = "Assam" }, new { value = "Bihar", Text = "Bihar" }, new { value = "Chandigarh", Text = "Chandigarh" },
                                                   new { value = "Chhattisgarh", Text = "Chhattisgarh" }, new { value = "Dadra and Nagar Haveli", Text = "Dadra and Nagar Haveli" }, new { value = "Daman and Diu", Text = "Daman and Diu" },
                                                   new { value = "Delhi", Text = "Delhi" }, new { value = "Goa", Text = "Goa" }, new { value = "Gujarat", Text = "Gujarat" }, new { value = "Haryana", Text = "Haryana" },
                                                   new { value = "Himachal Pradesh", Text = "Himachal Pradesh" }, new { value = "Jammu and Kashmir", Text = "Jammu and Kashmir" }, new { value = "Jharkhand", Text = "Jharkhand" },
                                                   new { value = "Karnataka", Text = "Karnataka" }, new { value = "Kerala", Text = "Kerala" }, new { value = "Lakshadweep", Text = "Lakshadweep" }, new { value = "Madhya Pradesh", Text = "Madhya Pradesh" },
                                                   new { value = "Maharashtra", Text = "Maharashtra" }, new { value = "Manipur", Text = "Manipur" }, new { value = "Meghalaya", Text = "Meghalaya" }, new { value = "Mizoram", Text = "Mizoram" },
                                                   new { value = "Nagaland", Text = "Nagaland" }, new { value = "Odisha", Text = "Odisha" }, new { value = "Puducherry", Text = "Puducherry" }, new { value = "Punjab", Text = "Punjab" },
                                                   new { value = "Rajasthan", Text = "Rajasthan" }, new { value = "Sikkim", Text = "Sikkim" }, new { value = "Tamil Nadu", Text = "Tamil Nadu" }, new { value = "Telangana", Text = "Telangana" },
                                                   new { value = "Tripura", Text = "Tripura" }, new { value = "Uttar Pradesh", Text = "Uttar Pradesh" }, new { value = "Uttaranchal", Text = "Uttaranchal" }, new { value = "West Bengal", Text = "West Bengal" }, }, "value", "Text", tbl_csi_69_con_registrationdetails.State);
            // var cntlist = new SelectList(db.tblCountryCodes, "Country", "Code");
            var StorageDevice = new SelectList(new[]
                                               { new { value = "1", Text = "CSI Member" },
                                                 new { value = "2", Text = "Non-CSI Member" },
                                                 //new { value = "3", Text = "Non-CSI Member" },
                                                 new { value = "4", Text = "PG Students" },
                                                 new { value = "5", Text = "Industry Professional" },
                                                 new { value = "6", Text = "Nurse/Technician" },
                                                 new { value = "7", Text = "SAARC Countries (Non-CSI Member)" },
                                                 new { value = "8", Text = "Non-SAARC Foreign Nationals" }, }, "value", "Text", tbl_csi_69_con_registrationdetails.Category);

            ViewBag.catgrylist = StorageDevice;
            var pfx = new SelectList(new[] { new { value = "Dr.", Text = "Dr." }, new { value = "Mr.", Text = "Mr." }, new { value = "Mrs.", Text = "Mrs." }, new { value = "Ms.", Text = "Ms." }, }, "value", "Text", tbl_csi_69_con_registrationdetails.Prefix);

            ViewBag.pfx = pfx;

            ViewBag.exrate = GlobalData.ExchangeRateFromAPI(1, "USD", "INR");


            return(View(tbl_csi_69_con_registrationdetails));
        }
        public ActionResult Thankyou1(string msg)
        {
            string[] arrResponse      = msg.Split('|'); //PG
            string   merchantId       = arrResponse[0];
            string   _customerId      = arrResponse[1];
            string   txnReferenceNo   = arrResponse[2];
            string   bankReferenceNo  = arrResponse[3];
            string   txnAmount        = Convert.ToDecimal(arrResponse[4]).ToString();
            string   bankId           = arrResponse[5];
            string   bankMerchantId   = arrResponse[6];
            string   txnType          = arrResponse[7];
            string   currency         = arrResponse[8];
            string   itemCode         = arrResponse[9];
            string   securityType     = arrResponse[10];
            string   securityId       = arrResponse[11];
            string   securityPassword = arrResponse[12];
            string   txnDate          = arrResponse[13]; //dd-mm-yyyy
            string   authStatus       = arrResponse[14];
            string   settlementType   = arrResponse[15];
            string   additionalInfo1  = arrResponse[16];
            //string additionalInfo1 = "10";
            string     additionalInfo2   = arrResponse[17];
            string     additionalInfo3   = arrResponse[18];
            string     additionalInfo4   = arrResponse[19];
            string     additionalInfo5   = arrResponse[20];
            string     additionalInfo6   = arrResponse[21];
            string     additionalInfo7   = arrResponse[22];
            string     errorStatus       = arrResponse[23];
            string     _errorDescription = arrResponse[24];
            string     _CheckSum         = arrResponse[25];
            GlobalData ga = new GlobalData();

            if (authStatus == "0300")
            {
                long tranid = Convert.ToInt64(additionalInfo1);
                tbl_CSI_69_Con_Transections Trans = db.tbl_CSI_69_Con_Transections.Find(tranid);
                Trans.AmountPaid = Convert.ToDecimal(txnAmount);
                Trans.Extra3     = txnReferenceNo;
                Trans.Status     = "Y";

                db.Entry(Trans).State = EntityState.Modified;
                db.SaveChanges();

                long custId = Convert.ToInt64(_customerId);
                tbl_CSI_69_Con_RegistrationDetails registration = db.tbl_CSI_69_Con_RegistrationDetails.Find(custId);
                ViewBag.Name = registration.Prefix + " " + registration.Name;
                int count = registration.tbl_CSI_69_Con_Accompanys.Count();
                if (count > 0)
                {
                    CSIMemberMail(registration, "Yes");
                }
                else
                {
                    CSIMemberMail(registration, "No");
                }
                // ga.AdminMail("*****@*****.**");
                ga.RegisterSendMail("*****@*****.**", "Satya Bhattacharyya", custId, tranid);
            }


            return(View());
        }
        private void CSIMemberMail(tbl_CSI_69_Con_RegistrationDetails registration, string accompany)
        {
            MailAddress mailFrom = new MailAddress("*****@*****.**", "69th Annual Conference of CSI");
            MailAddress mailTo   = new MailAddress(registration.Email, registration.Name);
            MailMessage mail     = new MailMessage(mailFrom, mailTo);

            mail.IsBodyHtml = true;
            string strMessage = "Thank you for your registration";

            mail.Subject = strMessage;


            strMessage += "<div align=\"center\">";
            strMessage += "<table border=\"1\" width=\"798\" cellpadding=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#F0F0F0\">";
            strMessage += "<tr>";
            strMessage += "<td>";
            strMessage += "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
            strMessage += "<tr>";
            strMessage += "<td colspan=\"5\">";
            strMessage += "<img border=\"0\" src=\"http://csicon2017.org/images/logo0000.png\" width=\"302\"></td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td colspan=\"5\"><hr style=\"border-top:1px solid #e5e5e5;border-left:none;border-right:none;border-bottom:none;\"></td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\"><b>";
            strMessage += "<font style=\"font-family:Trebuchet ms;font-size:14pt;font-weight:bold;color:#E4252C;\">Dear " + registration.Prefix + " " + registration.Name + "</font></b></td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\"><font style=\"font-family:Trebuchet ms;font-size:10pt;letter-spacing:1px;font-weight:normal;color:#333;line-height:20px;\">Your Registration and Online Payment has been successful for the <b>69th Annual Conference of Cardiological Society of India to be held from 7<sup>th</sup> to 10<sup>th</sup> December, 2017</b></font></td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\"><font style=\"font-family:Trebuchet ms;font-size:13pt;letter-spacing:1px;font-weight:normal;color:#333;line-height:22px;font-weight:bold;\">";
            strMessage += "Name</font></td>";
            strMessage += "<td width=\"31%\"><font style=\"font-family:Trebuchet ms;font-size:13pt;letter-spacing:1px;font-weight:normal;color:#E4252C;line-height:22px;font-weight:bold;\">Dr. " + registration.Prefix + " " + registration.Name + "</font></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #333333; letter-spacing: 1px\">";
            strMessage += "Amount</span></td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #E4252C; letter-spacing: 1px\">";
            strMessage += "Rs. " + registration.Payment_Amount.ToString() + "/-</span></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #333333; letter-spacing: 1px\">";
            strMessage += "Accompanying Person</span></td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #E4252C; letter-spacing: 1px\">";
            strMessage += accompany + "</span></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #333333; letter-spacing: 1px\">";
            strMessage += "Date of Registration</span></td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #E4252C; letter-spacing: 1px\">";
            strMessage += registration.CreatedDate.ToString("dd MMMM, yyyy") + "</span></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">";
            strMessage += "<span style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;color:#333333;font-size:12pt;\">Kindly keep this ";
            strMessage += "mail as a valid Online Payment acknowledgement and carry ";
            strMessage += "during the <b>Conference</b></span></td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\"><font style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;color:#333333;font-size:12pt;line-height:25px;\">Regards";
            strMessage += "<br>";
            strMessage += "</font>";
            strMessage += "<b>";
            strMessage += "<font style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;font-size:12pt;line-height:25px\" color=\"#E4252C\">Dr. Mrinal Kanti Das, Organizing Secretary</font><font style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;color:#333333;font-size:12pt;line-height:25px;\"> ";
            strMessage += "<br>";
            strMessage += "</font>";
            strMessage += "<font style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;color:#333333;font-size:11pt;line-height:25px\"> ";
            strMessage += "Indian Heart House, P-60, C.I.T Road,<br>";
            strMessage += "Scheme - VII-M, Kankurgachi,<br>";
            strMessage += "Kolkata - 700054, India<br>";
            strMessage += "Telephone: +91 33 2355 7837, 2355 6308, 2355 1500<br>";
            strMessage += "Email: </font></b><font style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;color:#333333;font-size:11pt;line-height:25px\"> ";
            strMessage += "<a href=\"mailto:[email protected]\">";
            strMessage += "<font color=\"#E4252C\"><span style=\"text-decoration: none\">[email protected]</span></font></a></font></td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"40\">";
            strMessage += "<td width=\"3%\" bgcolor=\"#ed3237\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" bgcolor=\"#ed3237\" align=\"right\" colspan=\"3\">";
            strMessage += "<a style=\"text-decoration: none;\" target=\"_blank\" href=\"http://csicon2017.org/\">";
            strMessage += "<span style=\"text-decoration: none;font-family: Trebuchet ms;color:#fff;font-weight:bold;font-size:10pt;\">www.csicon2017.org</span></a></td>";
            strMessage += "<td width=\"4%\" bgcolor=\"#ed3237\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "</table>";
            strMessage += "</td>";
            strMessage += "</tr>";
            strMessage += "</table>";
            strMessage += "</div>";

            mail.Body = strMessage;
            SmtpClient client = new SmtpClient("127.0.0.1");

            client.EnableSsl = false;
            client.Port      = 8025;
            // client.Send(mail);
        }
示例#10
0
    public void RegisterSendMail(string email, string name, long id, long tranid)
    {
        tbl_CSI_69_Con_RegistrationDetails tbl_csi_69_con_registrationdetails = db.tbl_CSI_69_Con_RegistrationDetails.Find(id);
        tbl_CSI_69_Con_Transections        Trans    = db.tbl_CSI_69_Con_Transections.Find(tranid);
        List <tbl_CSI_69_Con_Accompanys>   objgroup = new List <tbl_CSI_69_Con_Accompanys>();

        objgroup = db.tbl_CSI_69_Con_Accompanys.Where(t => t.RegId == id).ToList();

        //SelectList <tbl_CSI_69_Con_Accompanys> acmp = new SelectListItem<tbl_CSI_69_Con_Accompanys>
        string type = tbl_csi_69_con_registrationdetails.Category;
        string Date = tbl_csi_69_con_registrationdetails.CreatedDate.ToString("dd'/'MMM'/'yyyy");
        string Reference_No = Trans.Extra3;
        string Amount = tbl_csi_69_con_registrationdetails.Payment_Amount.ToString() + "/-";
        string Accompanying_Person = "0";
        int    veg = 0; int nonveg = 0;


        if (objgroup.Count() > 0)
        {
            Accompanying_Person = (objgroup.Count()).ToString();
        }
        else
        {
            Accompanying_Person = "NA";
        }

        string Choice_of_food = "";

        if (tbl_csi_69_con_registrationdetails.Foodtype == "vegetarian")
        {
            veg++;
        }
        else if (tbl_csi_69_con_registrationdetails.Foodtype == "nonvegetarian")
        {
            nonveg++;
        }


        if (objgroup.Count() > 0)
        {
            foreach (var item in objgroup)
            {
                if (item.Meal_Preference == "Veg")
                {
                    veg++;
                }

                else if (tbl_csi_69_con_registrationdetails.Foodtype == "Non-Veg")
                {
                    nonveg++;
                }
            }
        }

        Choice_of_food = veg.ToString() + " " + "Veg" + " ," + nonveg.ToString() + " " + "Non-Veg";

        if (type == "1")
        {
            type = "CSI Member";
        }
        else if (type == "2")
        {
            type = " Non-CSI Member ";
        }
        else if (type == "3")
        {
            type = "CSI Member";
        }
        else if (type == "4")
        {
            type = " PG Students";
        }
        else if (type == "5")
        {
            type = " Industry Professional";
        }
        else if (type == "6")
        {
            type = " Nurse/Technician";
        }
        else if (type == "7")
        {
            type = " SAARC Countries (Non-CSI Member)";
        }
        else if (type == "8")
        {
            type = " Non-SAARC Foreign Nationals";
        }

        try
        {
            MailAddress mailTo   = new MailAddress(email, name);
            MailAddress mailFrom = new MailAddress("*****@*****.**");
            // MailMessage mail = new MailMessage(mailFrom, mailTo);
            MailMessage mail = new MailMessage("*****@*****.**", "*****@*****.**");
            // MailMessage mail = new MailMessage("*****@*****.**", "*****@*****.**");
            // MailMessage mail = new MailMessage("*****@*****.**", "*****@*****.**");
            mail.IsBodyHtml = true;
            string strsubj = "Welcome to 69th Annual Conference of CSI Kolkata-2017";
            mail.Subject = strsubj;
            string strMessage = "";
            strMessage  = "<div align=\"center\">";
            strMessage += "<table border=\"1\" width=\"798\" cellpadding=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#F0F0F0\">";
            strMessage += "<tr>";
            strMessage += "<td>";
            strMessage += "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
            strMessage += "<tr>";
            strMessage += "<td colspan=\"2\"><img border=\"0\" src=\"http://csicon2017.org/images/logo0000.png\" width=\"302\"></td>";
            strMessage += "<td colspan=\"3\"><h3 style=\"padding:0 25px; font-family: Trebuchet ms;\">Welcome to 69th Annual Conference of Cardiological Society of India <span class=\"span\">Kolkata, 30<sup>th</sup> Nov. to 3rd Dec. 2017</span></h3></td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td colspan=\"5\"><hr style=\"border-top:1px solid #e5e5e5;border-left:none;border-right:none;border-bottom:none;\"></td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\"><b>";
            strMessage += "<font style=\"font-family:Trebuchet ms;font-size:14pt;font-weight:bold;color:#E4252C;\">Dear " + tbl_csi_69_con_registrationdetails.Prefix + "&nbsp;" + tbl_csi_69_con_registrationdetails.Name + "</font></b></td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\"><font style=\"font-family:Trebuchet ms;font-size:10pt;letter-spacing:1px;font-weight:normal;color:#333;line-height:20px;\">Your Registration has been accepted with successful confirmation of payment as per the below details:</font></td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\"><font style=\"font-family:Trebuchet ms;font-size:13pt;letter-spacing:1px;font-weight:normal;color:#333;line-height:22px;font-weight:bold;\">Category :</font></td>";
            strMessage += "<td width=\"31%\"><font style=\"font-family:Trebuchet ms;font-size:13pt;letter-spacing:1px;font-weight:normal;color:#E4252C;line-height:22px;font-weight:bold;\">" + type + "</font></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\"><font style=\"font-family:Trebuchet ms;font-size:13pt;letter-spacing:1px;font-weight:normal;color:#333;line-height:22px;font-weight:bold;\">";
            strMessage += "Payment Date :</font></td>";
            strMessage += "<td width=\"31%\"><font style=\"font-family:Trebuchet ms;font-size:13pt;letter-spacing:1px;font-weight:normal;color:#E4252C;line-height:22px;font-weight:bold;\">" + Date + "</font></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #333333; letter-spacing: 1px\">";
            strMessage += "Payment Reference No :</span></td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #E4252C; letter-spacing: 1px\">";
            strMessage += Reference_No + "</span></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #333333; letter-spacing: 1px\">";
            strMessage += "Amount :</span></td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #E4252C; letter-spacing: 1px\">";
            strMessage += Amount + "</span></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #333333; letter-spacing: 1px\">";
            strMessage += "Accompanying Person :</span></td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #E4252C; letter-spacing: 1px\">";
            strMessage += Accompanying_Person + "</span></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #333333; letter-spacing: 1px\">";
            strMessage += "Choice of food :</span></td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #E4252C; letter-spacing: 1px\">";
            strMessage += Choice_of_food + "</span></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">";
            strMessage += "<span style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;color:#333333;font-size:12pt;\">You can login to the Conference Portal using the following details:</b></span></td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #333333; letter-spacing: 1px\">";
            strMessage += "Username :</span></td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 300; font-size: 16pt; color: #E4252C; letter-spacing: 1px\">";
            strMessage += tbl_csi_69_con_registrationdetails.Username + "</span></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"35\">";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 700; font-size: 13pt; color: #333333; letter-spacing: 1px\">";
            strMessage += "Password :</span></td>";
            strMessage += "<td width=\"31%\">";
            strMessage += "<span style=\"font-family: Trebuchet ms; font-weight: 300; font-size: 16pt; color: #E4252C; letter-spacing: 1px\">";
            strMessage += tbl_csi_69_con_registrationdetails.Password + "</span></td>";
            strMessage += "<td width=\"31%\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">";
            strMessage += "<span style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;color:#E4252C;font-size:12pt;\">Kindly treat this email as original receipt of your transaction.</b></span></td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\"><font style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;color:#333333;font-size:12pt;line-height:25px;\">Regards";
            strMessage += "<br>";
            strMessage += "</font>";
            strMessage += "<b>";
            strMessage += "<font style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;font-size:12pt;line-height:25px\" color=\"#E4252C\">Dr. Mrinal Kanti Das, Organizing Secretary</font><font style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;color:#333333;font-size:12pt;line-height:25px;\"> ";
            strMessage += "<br>";
            strMessage += "</font>";
            strMessage += "<font style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;color:#333333;font-size:11pt;line-height:25px\"> ";
            strMessage += "Indian Heart House, P-60, C.I.T Road,<br>Scheme - VII-M, Kankurgachi,<br>Kolkata - 700054, India<br>Telephone: +91 33 2355 7837, 2355 6308, 2355 1500<br>Email: </font></b><font style=\"letter-spacing: 1px;font-family: Trebuchet ms;font-style:italic;color:#333333;font-size:11pt;line-height:25px\"> ";
            strMessage += "<a href=\"mailto:[email protected]\">";
            strMessage += "<font color=\"#E4252C\"><span style=\"text-decoration: none\">[email protected]</span></font></a> / <a href=\"http://www.csicon2017.org\">";
            strMessage += "<font color=\"#E4252C\"><span style=\"text-decoration: none\">www.csicon2017.org</span></font></a></font></td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr>";
            strMessage += "<td width=\"3%\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" colspan=\"3\">&nbsp;</td>";
            strMessage += "<td width=\"4%\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "<tr height=\"40\">";
            strMessage += "<td width=\"3%\" bgcolor=\"#ed3237\">&nbsp;</td>";
            strMessage += "<td width=\"93%\" bgcolor=\"#ed3237\" align=\"right\" colspan=\"3\">";
            strMessage += "<a style=\"text-decoration: none;\" target=\"_blank\" href=\"http://csicon2017.org/\">";
            strMessage += "<span style=\"text-decoration: none;font-family: Trebuchet ms;color:#fff;font-weight:bold;font-size:10pt;\">www.csicon2017.org</span></a></td>";
            strMessage += "<td width=\"4%\" bgcolor=\"#ed3237\">&nbsp;</td>";
            strMessage += "</tr>";
            strMessage += "</table>";
            strMessage += "</td>";
            strMessage += "</tr>";
            strMessage += "</table>";
            strMessage += "</div>";

            mail.Body = strMessage;
            //SmtpClient client = new SmtpClient((string)ConfigurationManager.AppSettings["NIC2013.smtpserver"]);
            //client.EnableSsl = false;
            // client.Port = 26;
            //client.Send(mail);
            SmtpClient client = new SmtpClient();
            client.Host      = "127.0.0.1";
            client.EnableSsl = false;
            client.Port      = 26;
            client.Send(mail);
            //==================================================
            //mail = new MailMessage("*****@*****.**", "*****@*****.**");
            //mail.IsBodyHtml = true;
            //client.Host = "127.0.0.1";
            //client.EnableSsl = false;
            //client.Port = 26;
            //client.Send(mail);
        }
        catch (Exception ex)
        {
            //m_lblMessage.Text = (string)("Mail seding failed");
            throw ex;
        }
    }
        //[ValidateAntiForgeryToken]
        public ActionResult Create(tbl_CSI_69_Con_RegistrationDetails tbl_csi_69_con_registrationdetails)
        {
            tbl_CSI_69_Con_Accompanys tbl_csi_69_con_accompanys = new tbl_CSI_69_Con_Accompanys();
            string Hdnid = Request.Form["hdnid"].ToString();
            // for Accompany_Pertion set value
            int count = Convert.ToInt32(Hdnid);


            string  Hdnmemberid = Request.Form["hdntypemember"].ToString();
            string  regno       = "";
            decimal payableAmt  = CalculatePayableAmount(tbl_csi_69_con_registrationdetails.Category, Convert.ToInt32(Hdnid));


            if (tbl_csi_69_con_registrationdetails.Badge_Name == null)
            {
                tbl_csi_69_con_registrationdetails.Badge_Name = tbl_csi_69_con_registrationdetails.Prefix + " " + tbl_csi_69_con_registrationdetails.Name;
            }
            if (tbl_csi_69_con_registrationdetails.Category == "1")
            {
                if (Hdnmemberid == "EC_Member")
                {
                    regno = "EC/CSICON17/10";
                }
                if (Hdnmemberid == "Ex_President")
                {
                    regno = "EP/CSICON17/10";
                }
                if (Hdnmemberid == "Ex_President")
                {
                    regno = "ES/CSICON17/10";
                }
                if (Hdnmemberid == "CSI_Member")
                {
                    regno = "CSIME/CSICON17/10";
                }
            }
            if (tbl_csi_69_con_registrationdetails.Category == "2")
            {
                regno = "NCSI/CSICON17/1000";
            }
            if (tbl_csi_69_con_registrationdetails.Category == "4")
            {
                regno = "PG/CSICON17/1000";
            }
            if (tbl_csi_69_con_registrationdetails.Category == "5")
            {
                regno = "IP/CSICON17/1000";
            }
            if (tbl_csi_69_con_registrationdetails.Category == "6")
            {
                regno = "NT/CSICON17/1000";
            }
            if (tbl_csi_69_con_registrationdetails.Category == "7")
            {
                regno = "SAARC/CSICON17/1000";
            }
            if (tbl_csi_69_con_registrationdetails.Category == "8")
            {
                regno = "IF/CSICON17/1000";
            }

            tbl_csi_69_con_registrationdetails.Regno          = regno;
            tbl_csi_69_con_registrationdetails.CreatedDate    = DateTime.Now;
            tbl_csi_69_con_registrationdetails.ModifiedDate   = DateTime.Now;
            tbl_csi_69_con_registrationdetails.ModifiedBy     = 1;
            tbl_csi_69_con_registrationdetails.Payment_Id     = 1;
            tbl_csi_69_con_registrationdetails.Payment_Amount = payableAmt;
            tbl_csi_69_con_registrationdetails.Sponsorship    = " NA";
            tbl_csi_69_con_registrationdetails.Status         = 1;
            if (ModelState.IsValid)
            {
                long lastProductId = db.tbl_CSI_69_Con_RegistrationDetails.Max(item => item.RegId);
                lastProductId = lastProductId + 1;
                tbl_csi_69_con_registrationdetails.Regno = regno + lastProductId.ToString();
                db.tbl_CSI_69_Con_RegistrationDetails.Add(tbl_csi_69_con_registrationdetails);
                db.SaveChanges();
                lastProductId = db.tbl_CSI_69_Con_RegistrationDetails.Max(item => item.RegId);

                if (count > 0)
                {
                    string anam                       = "Accompany_Pertion_Name";
                    string age                        = "Accompany_Pertion_Age";
                    string sex                        = "Accompany_Pertion_sex";
                    string meal                       = "Accompany_Pertion_meal";
                    string AccommodationPtn           = "Accompany_Pertion_Accommodation";
                    string Accompany_frmday           = "Accompany_frmday";
                    string Accompany_frmmonth         = "Accompany_frmmonth";
                    string Accompany_today            = "Accompany_today";
                    string Accompany_tomonth          = "Accompany_tomonth";
                    string Accompany_Check_inh        = "Accompany_Check_inh";
                    string Accompany_Check_inm        = "Accompany_Check_inm";
                    string Accompany_Check_inMeridian = "Accompany_Check_inMeridian";
                    string Accompany_Check_outh       = "Accompany_Check_outh";
                    string Accompany_Check_outm       = "Accompany_Check_outm";
                    string Accompany_Check_outMeridia = "Accompany_Check_outMeridian";

                    for (int i = 1; i <= count; i++)
                    {
                        anam                       = "Accompany_Pertion_Name" + i.ToString();
                        age                        = "Accompany_Pertion_Age" + i.ToString();
                        sex                        = "Accompany_Pertion_sex" + i.ToString();
                        meal                       = "Accompany_Pertion_meal" + i.ToString();
                        AccommodationPtn           = "Accompany_Pertion_Accommodation" + i.ToString();
                        Accompany_frmday           = "Accompany_frmday" + i.ToString();
                        Accompany_frmmonth         = "Accompany_frmmonth" + i.ToString();
                        Accompany_today            = "Accompany_today" + i.ToString();
                        Accompany_tomonth          = "Accompany_tomonth" + i.ToString();
                        Accompany_Check_inh        = "Accompany_Check_inh" + i.ToString();
                        Accompany_Check_inm        = "Accompany_Check_inm" + i.ToString();
                        Accompany_Check_inMeridian = "Accompany_Check_inMeridian" + i.ToString();
                        Accompany_Check_outh       = "Accompany_Check_outh" + i.ToString();
                        Accompany_Check_outm       = "Accompany_Check_outm" + i.ToString();
                        Accompany_Check_outMeridia = "Accompany_Check_outMeridian" + i.ToString();

                        tbl_csi_69_con_accompanys.RegId           = lastProductId;
                        tbl_csi_69_con_accompanys.Name            = Request.Form[anam];
                        tbl_csi_69_con_accompanys.Age             = Convert.ToInt32(Request.Form[age]);
                        tbl_csi_69_con_accompanys.Sex             = Request.Form[sex].ToString();
                        tbl_csi_69_con_accompanys.Meal_Preference = Request.Form[meal].ToString();
                        tbl_csi_69_con_accompanys.Accommodation   = Request.Form[AccommodationPtn].ToString();
                        tbl_csi_69_con_accompanys.FromDate        = Request.Form[Accompany_frmday].ToString() + "/" + Request.Form[Accompany_frmmonth].ToString() + "/2017";
                        tbl_csi_69_con_accompanys.ToDate          = Request.Form[Accompany_today].ToString() + "/" + Request.Form[Accompany_tomonth].ToString() + "/2017";
                        tbl_csi_69_con_accompanys.Check_in_Time   = Request.Form[Accompany_Check_inh].ToString() + ":" + Request.Form[Accompany_Check_inm].ToString() + " " + Request.Form[Accompany_Check_inMeridian].ToString();
                        tbl_csi_69_con_accompanys.Check_out_Time  = Request.Form[Accompany_Check_outh].ToString() + ":" + Request.Form[Accompany_Check_outm].ToString() + " " + Request.Form[Accompany_Check_outMeridia].ToString();
                        db.tbl_CSI_69_Con_Accompanys.Add(tbl_csi_69_con_accompanys);
                        db.SaveChanges();
                    }
                }
                tbl_CSI_69_Con_Transections Trans = new tbl_CSI_69_Con_Transections();
                // Trans.UserId = tbl_csi_69_con_registrationdetails.RegId;
                Trans.UserId      = lastProductId;
                Trans.AmountToPay = payableAmt;
                Trans.AmountPaid  = 0;
                Trans.TransDate   = DateTime.Now.Date;
                Trans.Status      = "N";
                Trans.Remarks     = "";
                db.tbl_CSI_69_Con_Transections.Add(Trans);
                db.SaveChanges();
                long       id1 = db.tbl_CSI_69_Con_Transections.Max(item => item.TransId);
                GlobalData ga  = new GlobalData();
                ga.AdminMail("*****@*****.**");
                ga.RegisterSendMail("*****@*****.**", "Satya Bhattacharyya", lastProductId, id1);
                return(RedirectToAction("Billdesk", "Registration", new { id = id1 }));
                //return RedirectToAction("Index");
            }

            ViewBag.cntlist = new SelectList(db.tblCountryCodes, "Code", "Country");
            var StorageDevice = new SelectList(new[]
                                               { new { value = "1", Text = "CSI Member" },
                                                 new { value = "2", Text = "Non-CSI Member" },
                                                 //new { value = "3", Text = "Non-CSI Member" },
                                                 new { value = "4", Text = "PG Students" },
                                                 new { value = "5", Text = "Industry Professional" },
                                                 new { value = "6", Text = "Nurse/Technician" },
                                                 new { value = "7", Text = "SAARC Countries (Non-CSI Member)" },
                                                 new { value = "8", Text = "Non-SAARC Foreign Nationals" }, }, "value", "Text");

            ViewBag.catgrylist = StorageDevice;
            var pfx = new SelectList(new[] { new { value = "Dr.", Text = "Dr." }, new { value = "Mr.", Text = "Mr." }, new { value = "Mrs.", Text = "Mrs." }, new { value = "Ms.", Text = "Ms." }, }, "value", "Text");

            ViewBag.Prefixlst = pfx;

            return(View(tbl_csi_69_con_registrationdetails));
        }