public static string GetCustomers()
        {
            clsStudentDetail clsStdDetail = new clsStudentDetail();
            string           SchoolID     = HttpContext.Current.Session["SchoolId"].ToString();
            var detail = clsStdDetail.GetStudentDetail(SchoolID);

            return(Serialize <List <PR_StudentDetail> >(detail));
        }
        public static object GetIdData()
        {
            string           SchoolID = string.Empty;
            clsStudentDetail stdCls   = new clsStudentDetail();

            List <string> scrnoa = new List <string>();

            scrnoa            = PrintData.pridata; // (List<String>)HttpContext.Current.Session["printScID"];
            PrintData.pridata = null;

            SchoolID = HttpContext.Current.Session["SchoolId"].ToString();

            List <PR_StudentDetail> studentDetail = stdCls.GetStudentDetail(SchoolID).ToList();

            List <PR_StudentDetail> lstdetail = new List <PR_StudentDetail>();

            if (scrnoa != null)
            {
                for (int i = 0; i < scrnoa.Count; i++)
                {
                    lstdetail.Add(studentDetail.Where(x => x.ScholarNo == scrnoa[i]).FirstOrDefault());
                }
                return(lstdetail.Select(f =>
                                        new
                {
                    stdId = f.ScholarNo,
                    stdPhoto = f.StudentPhoto,
                    stdName = f.StudentName,
                    stdClass = f.Class,
                    stdDOB = f.DateofBarth,
                    stdPhone = f.PhoneNumber,
                    stdFatherName = f.FatherName,
                    stdGender = f.F1,
                    stdAddress = f.Addres
                }));
            }
            else
            {
                return(lstdetail.Select(f =>
                                        new
                {
                    stdId = "123",
                    stdPhoto = "",
                    stdName = "Test Name",
                    stdClass = "I",
                    stdDOB = "20/07/2016",
                    stdPhone = "9500000000",
                    stdFatherName = "Father Name",
                    stdGender = "Mr.",
                    stdAddress = "Delhi India"
                }));
            }
        }
Esempio n. 3
0
        private string insertSchoolFild(string schoolID)
        {
            PR_SchoolFild    oSCFild      = new PR_SchoolFild();
            clsStudentDetail objStdDetail = new clsStudentDetail();

            oSCFild.MyIdFild       = FildData();
            oSCFild.SchoolID       = schoolID;
            oSCFild.lasUpdatedTime = DateTime.Now;
            string returncode = objStdDetail.InsertSchoolFild(oSCFild);

            return(returncode);
        }
        public static void DeleteCustomer(string ScholarNo)
        {
            string Schoolid = HttpContext.Current.Session["SchoolId"].ToString();

            clsStudentDetail clsStdDetail = new clsStudentDetail();

            PR_StudentDetail oldStdData = new PR_StudentDetail();

            oldStdData.SchoolUID = Schoolid;

            oldStdData.ScholarNo = ScholarNo;
            string retCode = clsStdDetail.DeleteStudetDetail(oldStdData);
        }
        public static string InsertCustomer(string ScholarNo, string F1, string StudentName, string FatherName, string DateofBarth, string Class, string PhoneNumber, string Addres)
        {
            string           Schoolid = HttpContext.Current.Session["SchoolId"].ToString();
            clsStudentDetail stdCls   = new clsStudentDetail();

            if (!string.IsNullOrWhiteSpace(ScholarNo))
            {
                PR_StudentDetail oStdData = new PR_StudentDetail();
                oStdData.SchoolUID    = Schoolid;
                oStdData.ScholarNo    = ScholarNo;
                oStdData.StudentName  = StudentName;
                oStdData.FatherName   = FatherName;
                oStdData.MotherName   = "";
                oStdData.BloodGroup   = "";
                oStdData.DateofBarth  = DateofBarth;
                oStdData.EmailId      = "";
                oStdData.PhoneNumber  = PhoneNumber;
                oStdData.Addres       = Addres;
                oStdData.LastUpdated  = DateTime.Now;
                oStdData.Status       = 0;
                oStdData.IsActive     = 1;
                oStdData.Class        = Class;
                oStdData.F1           = F1;
                oStdData.StudentPhoto = "";

                string retCode = stdCls.InsertStudetDetail(oStdData);
                if (retCode != "1")
                {
                    retCode = retCode + "There are some error contact to admin !!";
                    return(retCode);
                }
                else
                {
                    retCode = "Data Inserted Sucess  ";
                    return(ScholarNo);
                }
            }
            else
            {
                return(ScholarNo);
            }
        }
        private void insertSchoolFild(string schoolID)
        {
            PR_SchoolFild    oSCFild      = new PR_SchoolFild();
            clsStudentDetail objStdDetail = new clsStudentDetail();

            oSCFild.MyIdFild       = FildData();
            oSCFild.SchoolID       = schoolID;
            oSCFild.lasUpdatedTime = DateTime.Now;
            string returncode = objStdDetail.InsertSchoolFild(oSCFild);

            if (returncode == "1")
            {
                divUnsucrss.Style.Add("display", "none");
                divsucrss.Style.Remove("display");
                ltrSucess.Text = "Data Updated Sucess  ";
            }
            else
            {
                divsucrss.Style.Add("display", "none");
                divUnsucrss.Style.Remove("display");
                ltrNotSucess.Text = "There are some error contact to admin !!";
                return;
            }
        }