using System; using System.ServiceModel; using System.ServiceModel.Activation; using System.ServiceModel.Web; using System.Data; using System.Configuration; using System.Data.SqlClient; using System.Xml; using System.IO; using System.Text; using System.ServiceModel; using System.Xml.Linq; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; //using System.Net.Mail; using System.Web.Services; using System.Web.Script.Services; //using java.awt; using System.Web.Script.Serialization; using System.Diagnostics; using System.Web; using System.ServiceModel.Channels; using System.Net; using System.Net.Mail; using nmsSetup; using nmsLogin; public class Service { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ConnectionString); [OperationContract] [WebMethod(EnableSession = true)] [WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)] public string studentRegistration(string StartDate, string name, string MotherName, string city, string Stid, string District, string relation, string fatherName, string catID, string mobNo, string phoneNo, string DOB, string marital, string address, string pinCode, string emailID, string Organisation, string courseName, string Applicationno, string coursefee, string Paidfee,string PendingFee, string Concession, string ConcessionR, string Latefee, string Otherfee, string duedate, string tranType, string remark, string username, string Bankname, string BankAccount, string Chequenum) {///{id}/{pg} System.Web.Script.Serialization.JavaScriptSerializer jSearializer = new System.Web.Script.Serialization.JavaScriptSerializer(); BlEditor.Bl obj2 = new BlEditor.Bl(); Property.DataLayer dl = new Property.DataLayer(); if (id != "") dl.producttypeid = id; if (name != "") dl.itemname = name; if (catname != "") dl.itemunittype = catname; dl.page = pg; //string st = DataTableToJsonWithStringBuilder(); return jSearializer.Serialize(obj2.spshowallquickproducttypeAdm(dl)); System.Web.Script.Serialization.JavaScriptSerializer jSearializer = new System.Web.Script.Serialization.JavaScriptSerializer(); try { PRPSetup prp = new PRPSetup(); clsBLSetup obj = new clsBLSetup(); prp.StartDate = StartDate; prp.name = name; prp.MotherName = MotherName; prp.city = Cityid; prp.Stid = Stid; prp.District = District; prp.relation = relation; if (prp.relation == "S/o") { prp.sex = "Male"; } else { prp.sex = "Female"; } prp.fatherName = fatherName; prp.catID = catID; prp.mobNo = mobNo; prp.phoneNo = ""; //phoneNo; prp.DOB = DOB; prp.marital = "Un-married"; //marital; prp.address = address; prp.pinCode = pinCode; prp.emailID = emailID; prp.Organisation = Organisation; prp.courseName = courseName; prp.Applicationno = Applicationno; prp.coursefee = coursefee; prp.Paidfee = Paidfee; prp.PendingFee = PendingFee; prp.Concession = Concecssion; prp.ConcessionR = ConcessionR; prp.Latefee = Latefee; prp.Otherfee = Otherfee; prp.duedate = duedate; prp.tranType = tranType; prp.remark = remark; prp.username = username; prp.Bankname = Bankname; prp.BankAccount = BankAccount; prp.Chequenum = Chequenum; prpLogin prplogin = new prpLogin(); string sms = ""; if (Session["OfficeAdmin"] != null) { prplogin = (prpLogin)context.Session["OfficeAdmin"]; sms = "|SucessFully Saved"; } else { sms = "|Session Is Expired Please Re-login For Admission"; } prp.branchId = prplogin.branchId; prp.EmployeeID = prplogin.EmployeeId; prp.photo = photo; prp.document = ""; //document; if (sms == "|SucessFully Saved") { obj.InsStudent(prp); } Mprp.IsSucess = true; Mprp.CallBack = CallBackMethodName; Mprp.ResponseData = null; Mprp.Message = sms; } catch (Exception ex) { Mprp.Message = ex.Message; Mprp.IsSucess = false; } return jSearializer.Serialize(Mprp); } }