public string UpdateParentDetailService(ParentDetails ParentDetails) { DbParam[] param = new DbParam[] { new DbParam(ParentDetails.ParentDetailId, typeof(System.String), "_ParentDetailUid"), new DbParam(userDetail.schooltenentId, typeof(System.String), "_TenentUid"), new DbParam(ParentDetails.FatherFirstName, typeof(System.String), "_FatherFirstName"), new DbParam(ParentDetails.FatherLastName, typeof(System.String), "_FatherLastName"), new DbParam(ParentDetails.FatherMobileno, typeof(System.String), "_FatherMobileno"), new DbParam(ParentDetails.Fatheremailid, typeof(System.String), "_Fatheremailid"), new DbParam(ParentDetails.Fatheroccupation, typeof(System.String), "_Fatheroccupation"), new DbParam(ParentDetails.Fatherqualification, typeof(System.String), "_Fatherqualification"), new DbParam(ParentDetails.MotherFirstName, typeof(System.String), "_MotherFirstName"), new DbParam(ParentDetails.MotherLastName, typeof(System.String), "_MotherLastName"), new DbParam(ParentDetails.MotherMobileno, typeof(System.String), "_MotherMobileno"), new DbParam(ParentDetails.Motheremailid, typeof(System.String), "_Motheremailid"), new DbParam(ParentDetails.MotherOccupation, typeof(System.String), "_MotherOccupation"), new DbParam(ParentDetails.MotherQualification, typeof(System.String), "_MotherQualification"), new DbParam(ParentDetails.LocalGuardianFullName, typeof(System.String), "_LocalGuardianFullName"), new DbParam(ParentDetails.LocalGuardianMobileno, typeof(System.String), "_LocalGuardianMobileno"), new DbParam(ParentDetails.LocalGuardianemailid, typeof(System.String), "_LocalGuardianemailid"), new DbParam(userDetail.UserId, typeof(System.String), "_Adminid") }; var output = db.ExecuteNonQuery("sp_Parentdetail_Upd", param, true); return(output); }
public ActionResult Add() { int school_id = SessionHandler.GetSchoolID(); ParentDetails _pd = new ParentDetails(); ClassDetails _cd = new ClassDetails(); ViewBag.parents = _pd.GetAll(school_id); ViewBag.classes = _cd.GetAll(school_id); return View(); }
public ActionResult FamilyReport(int p_id=0) { int school_id = SessionHandler.GetSchoolID(); var parents = new ParentDetails().GetAll(school_id); ViewBag.parents = parents; if (p_id > 0) { ViewBag.isSelected = true; var stds = new StudentDetails().GetAllChildren(school_id, p_id); var length = parents.Count(); if(length > 0) { string stds_ids = "("; int i = 0; foreach (var std in stds) { stds_ids += std.user_id; if ((i + 1) != length) { stds_ids += ","; } i++; } stds_ids += ")"; ViewBag.children = stds; var student_fees = new StudentFeeDetails().GetAll(school_id, stds_ids); return View("FamilyReport", student_fees); } } return View("FamilyReport"); }
public Scheduler GetInitialAppointmentByClientId(Scheduler schedular) { ParentDetails parentDetails = new ParentDetails(); try { command.Parameters.Clear(); command.Parameters.Add(new SqlParameter("@AgencyID", schedular.AgencyId)); command.Parameters.Add(new SqlParameter("@ClientId", schedular.ClientId)); command.Connection = Connection; command.CommandType = CommandType.StoredProcedure; command.CommandText = "USP_GetInitialAppointmentByClient"; if (Connection.State == ConnectionState.Open) { Connection.Close(); } Connection.Open(); _dataset = new DataSet(); DataAdapter = new SqlDataAdapter(command); DataAdapter.Fill(_dataset); schedular = new Scheduler(); schedular.ParentDetailsList = new List <ParentDetails>(); if (_dataset != null) { if (_dataset.Tables[0].Rows.Count > 0) { schedular = (from DataRow dr in _dataset.Tables[0].Rows select new Scheduler { ClientId = Convert.ToInt64(dr["ClientId"]), MeetingDate = Convert.ToString(dr["MeetingDate"]), StartTime = Convert.ToString(dr["StartTime"]), EndTime = Convert.ToString(dr["EndTime"]), Duration = Convert.ToString(dr["Duration"]), IsRepeat = Convert.ToBoolean(dr["IsRecurring"]), Day = Convert.ToString(dr["Day"]), MeetingId = Convert.ToInt64(dr["ID"]) } ).ToList()[0]; } if (_dataset.Tables[1].Rows.Count > 0) { schedular.ParentDetailsList = (from DataRow dr1 in _dataset.Tables[1].Rows select new ParentDetails { ParentName = dr1["ParentName"].ToString(), ParentRole = (dr1["ParentRole"].ToString() == "1") ? "Father" : "Mother", ClientId = dr1["ClientId"].ToString() } ).ToList(); } } } catch (Exception ex) { clsError.WriteException(ex); } finally { if (Connection != null) { Connection.Close(); } } return(schedular); }
public static CreateOrderReferenceForIdResponse InvokeCreateOrderReferenceForId(IOffAmazonPaymentsService service, CreateOrderReferenceForIdRequest request) { CreateOrderReferenceForIdResponse response = null; try { response = service.CreateOrderReferenceForId(request); Console.WriteLine("Service Response"); Console.WriteLine("============================================================================="); Console.WriteLine(); Console.WriteLine(" CreateOrderReferenceForIdResponse"); if (response.IsSetCreateOrderReferenceForIdResult()) { Console.WriteLine(" CreateOrderReferenceForIdResult"); CreateOrderReferenceForIdResult createOrderReferenceForIdResult = response.CreateOrderReferenceForIdResult; if (createOrderReferenceForIdResult.IsSetOrderReferenceDetails()) { Console.WriteLine(" OrderReferenceDetails"); OrderReferenceDetails orderReferenceDetails = createOrderReferenceForIdResult.OrderReferenceDetails; if (orderReferenceDetails.IsSetAmazonOrderReferenceId()) { Console.WriteLine(" AmazonOrderReferenceId"); Console.WriteLine(" {0}", orderReferenceDetails.AmazonOrderReferenceId); } if (orderReferenceDetails.IsSetBuyer()) { Console.WriteLine(" Buyer"); Buyer buyer = orderReferenceDetails.Buyer; if (buyer.IsSetName()) { Console.WriteLine(" Name"); Console.WriteLine(" {0}", buyer.Name); } if (buyer.IsSetEmail()) { Console.WriteLine(" Email"); Console.WriteLine(" {0}", buyer.Email); } if (buyer.IsSetPhone()) { Console.WriteLine(" Phone"); Console.WriteLine(" {0}", buyer.Phone); } } if (orderReferenceDetails.IsSetOrderTotal()) { Console.WriteLine(" OrderTotal"); OrderTotal orderTotal = orderReferenceDetails.OrderTotal; if (orderTotal.IsSetCurrencyCode()) { Console.WriteLine(" CurrencyCode"); Console.WriteLine(" {0}", orderTotal.CurrencyCode); } if (orderTotal.IsSetAmount()) { Console.WriteLine(" Amount"); Console.WriteLine(" {0}", orderTotal.Amount); } } if (orderReferenceDetails.IsSetSellerNote()) { Console.WriteLine(" SellerNote"); Console.WriteLine(" {0}", orderReferenceDetails.SellerNote); } if (orderReferenceDetails.IsSetPlatformId()) { Console.WriteLine(" PlatformId"); Console.WriteLine(" {0}", orderReferenceDetails.PlatformId); } if (orderReferenceDetails.IsSetDestination()) { Console.WriteLine(" Destination"); Destination destination = orderReferenceDetails.Destination; if (destination.IsSetDestinationType()) { Console.WriteLine(" DestinationType"); Console.WriteLine(" {0}", destination.DestinationType); } if (destination.IsSetPhysicalDestination()) { Console.WriteLine(" PhysicalDestination"); Address physicalDestination = destination.PhysicalDestination; if (physicalDestination.IsSetName()) { Console.WriteLine(" Name"); Console.WriteLine(" {0}", physicalDestination.Name); } if (physicalDestination.IsSetAddressLine1()) { Console.WriteLine(" AddressLine1"); Console.WriteLine(" {0}", physicalDestination.AddressLine1); } if (physicalDestination.IsSetAddressLine2()) { Console.WriteLine(" AddressLine2"); Console.WriteLine(" {0}", physicalDestination.AddressLine2); } if (physicalDestination.IsSetAddressLine3()) { Console.WriteLine(" AddressLine3"); Console.WriteLine(" {0}", physicalDestination.AddressLine3); } if (physicalDestination.IsSetCity()) { Console.WriteLine(" City"); Console.WriteLine(" {0}", physicalDestination.City); } if (physicalDestination.IsSetCounty()) { Console.WriteLine(" County"); Console.WriteLine(" {0}", physicalDestination.County); } if (physicalDestination.IsSetDistrict()) { Console.WriteLine(" District"); Console.WriteLine(" {0}", physicalDestination.District); } if (physicalDestination.IsSetStateOrRegion()) { Console.WriteLine(" StateOrRegion"); Console.WriteLine(" {0}", physicalDestination.StateOrRegion); } if (physicalDestination.IsSetPostalCode()) { Console.WriteLine(" PostalCode"); Console.WriteLine(" {0}", physicalDestination.PostalCode); } if (physicalDestination.IsSetCountryCode()) { Console.WriteLine(" CountryCode"); Console.WriteLine(" {0}", physicalDestination.CountryCode); } if (physicalDestination.IsSetPhone()) { Console.WriteLine(" Phone"); Console.WriteLine(" {0}", physicalDestination.Phone); } } } if (orderReferenceDetails.IsSetBillingAddress()) { Console.WriteLine(" BillingAddress"); BillingAddress billingAddress = orderReferenceDetails.BillingAddress; if (billingAddress.IsSetAddressType()) { Console.WriteLine(" AddressType"); Console.WriteLine(" {0}", billingAddress.AddressType); } if (billingAddress.IsSetPhysicalAddress()) { Console.WriteLine(" PhysicalAddress"); Address physicalAddress = billingAddress.PhysicalAddress; if (physicalAddress.IsSetName()) { Console.WriteLine(" Name"); Console.WriteLine(" {0}", physicalAddress.Name); } if (physicalAddress.IsSetAddressLine1()) { Console.WriteLine(" AddressLine1"); Console.WriteLine(" {0}", physicalAddress.AddressLine1); } if (physicalAddress.IsSetAddressLine2()) { Console.WriteLine(" AddressLine2"); Console.WriteLine(" {0}", physicalAddress.AddressLine2); } if (physicalAddress.IsSetAddressLine3()) { Console.WriteLine(" AddressLine3"); Console.WriteLine(" {0}", physicalAddress.AddressLine3); } if (physicalAddress.IsSetCity()) { Console.WriteLine(" City"); Console.WriteLine(" {0}", physicalAddress.City); } if (physicalAddress.IsSetCounty()) { Console.WriteLine(" County"); Console.WriteLine(" {0}", physicalAddress.County); } if (physicalAddress.IsSetDistrict()) { Console.WriteLine(" District"); Console.WriteLine(" {0}", physicalAddress.District); } if (physicalAddress.IsSetStateOrRegion()) { Console.WriteLine(" StateOrRegion"); Console.WriteLine(" {0}", physicalAddress.StateOrRegion); } if (physicalAddress.IsSetPostalCode()) { Console.WriteLine(" PostalCode"); Console.WriteLine(" {0}", physicalAddress.PostalCode); } if (physicalAddress.IsSetCountryCode()) { Console.WriteLine(" CountryCode"); Console.WriteLine(" {0}", physicalAddress.CountryCode); } if (physicalAddress.IsSetPhone()) { Console.WriteLine(" Phone"); Console.WriteLine(" {0}", physicalAddress.Phone); } } } if (orderReferenceDetails.IsSetReleaseEnvironment()) { Console.WriteLine(" ReleaseEnvironment"); Console.WriteLine(" {0}", orderReferenceDetails.ReleaseEnvironment); } if (orderReferenceDetails.IsSetSellerOrderAttributes()) { Console.WriteLine(" SellerOrderAttributes"); SellerOrderAttributes sellerOrderAttributes = orderReferenceDetails.SellerOrderAttributes; if (sellerOrderAttributes.IsSetSellerOrderId()) { Console.WriteLine(" SellerOrderId"); Console.WriteLine(" {0}", sellerOrderAttributes.SellerOrderId); } if (sellerOrderAttributes.IsSetStoreName()) { Console.WriteLine(" StoreName"); Console.WriteLine(" {0}", sellerOrderAttributes.StoreName); } if (sellerOrderAttributes.IsSetOrderItemCategories()) { Console.WriteLine(" OrderItemCategories"); OrderItemCategories orderItemCategories = sellerOrderAttributes.OrderItemCategories; List <String> orderItemCategoryList = orderItemCategories.OrderItemCategory; foreach (String orderItemCategory in orderItemCategoryList) { Console.WriteLine(" OrderItemCategory"); Console.WriteLine(" {0}", orderItemCategory); } } if (sellerOrderAttributes.IsSetCustomInformation()) { Console.WriteLine(" CustomInformation"); Console.WriteLine(" {0}", sellerOrderAttributes.CustomInformation); } } if (orderReferenceDetails.IsSetOrderReferenceStatus()) { Console.WriteLine(" OrderReferenceStatus"); OrderReferenceStatus orderReferenceStatus = orderReferenceDetails.OrderReferenceStatus; if (orderReferenceStatus.IsSetState()) { Console.WriteLine(" State"); Console.WriteLine(" {0}", orderReferenceStatus.State); } if (orderReferenceStatus.IsSetLastUpdateTimestamp()) { Console.WriteLine(" LastUpdateTimestamp"); Console.WriteLine(" {0}", orderReferenceStatus.LastUpdateTimestamp); } if (orderReferenceStatus.IsSetReasonCode()) { Console.WriteLine(" ReasonCode"); Console.WriteLine(" {0}", orderReferenceStatus.ReasonCode); } if (orderReferenceStatus.IsSetReasonDescription()) { Console.WriteLine(" ReasonDescription"); Console.WriteLine(" {0}", orderReferenceStatus.ReasonDescription); } } if (orderReferenceDetails.IsSetConstraints()) { Console.WriteLine(" Constraints"); Constraints constraints = orderReferenceDetails.Constraints; List <Constraint> constraintList = constraints.Constraint; foreach (Constraint constraint in constraintList) { Console.WriteLine(" Constraint"); if (constraint.IsSetConstraintID()) { Console.WriteLine(" ConstraintID"); Console.WriteLine(" {0}", constraint.ConstraintID); } if (constraint.IsSetDescription()) { Console.WriteLine(" Description"); Console.WriteLine(" {0}", constraint.Description); } } } if (orderReferenceDetails.IsSetCreationTimestamp()) { Console.WriteLine(" CreationTimestamp"); Console.WriteLine(" {0}", orderReferenceDetails.CreationTimestamp); } if (orderReferenceDetails.IsSetExpirationTimestamp()) { Console.WriteLine(" ExpirationTimestamp"); Console.WriteLine(" {0}", orderReferenceDetails.ExpirationTimestamp); } if (orderReferenceDetails.IsSetParentDetails()) { Console.WriteLine(" ParentDetails"); ParentDetails parentDetails = orderReferenceDetails.ParentDetails; if (parentDetails.IsSetId()) { Console.WriteLine(" Id"); Console.WriteLine(" {0}", parentDetails.Id); } if (parentDetails.IsSetType()) { Console.WriteLine(" Type"); Console.WriteLine(" {0}", parentDetails.Type); } } if (orderReferenceDetails.IsSetIdList()) { Console.WriteLine(" IdList"); IdList idList = orderReferenceDetails.IdList; List <String> memberList = idList.member; foreach (String member in memberList) { Console.WriteLine(" member"); Console.WriteLine(" {0}", member); } } } } if (response.IsSetResponseMetadata()) { Console.WriteLine(" ResponseMetadata"); ResponseMetadata responseMetadata = response.ResponseMetadata; if (responseMetadata.IsSetRequestId()) { Console.WriteLine(" RequestId"); Console.WriteLine(" {0}", responseMetadata.RequestId); } } } catch (OffAmazonPaymentsServiceException ex) { PrintException(ex); } return(response); }
// // GET: /Student/ public ActionResult Index() { int school_id =SessionHandler.GetSchoolID(); var students = _sd.GetAll(school_id); var parents = new ParentDetails().GetAll(school_id); var classes = new ClassDetails().GetAll(school_id); foreach(Student std in students) { foreach(Parent p in parents) { if(std.parent_id == p.user_id) { std.parent_name = p.full_name; } } foreach (Class c in classes) { if (std.class_id == c.class_id) { std.class_name = c.name; } } } return View(students); }
public ActionResult Edit(int id, StudentModelView student) { int school_id = SessionHandler.GetUserID(); var result = _sd.FindSingle(id, school_id); ParentDetails _pd = new ParentDetails(); ClassDetails _cd = new ClassDetails(); ViewBag.parents = _pd.GetAll(school_id); ViewBag.classes = _cd.GetAll(school_id); return View(result); }
public IResponse <ApiResponse> UpdateParentDetailService(ParentDetails ParentDetails) { var result = registrationService.UpdateParentDetailService(ParentDetails); return(null);// Json(result, JsonRequestBehavior.AllowGet); }
public ActionResult StudentFee(int student_id=0, int class_id=0) { int school_id = SessionHandler.GetSchoolID(); var session_id = SessionHandler.GetSchoolSessionID(); var classes = Utils.GetClasses(school_id); var _sd = Utils.GetClassStudent(school_id, class_id); var sds = (from s in _sd select new { fullname = s.first_name + " " + s.last_name, id = s.user_id,class_id= s.class_id }).ToList().ToJSON(); ViewBag.classes = classes; ViewBag.student_id = student_id; ViewBag.class_id = class_id; ViewBag.students = sds; if(student_id != 0 && class_id != 0) { ViewBag.isSelected = true; var fees = new StudentFeeDetails().GetAll(school_id, student_id, class_id); var std_itself = new StudentDetails().FindSingle(student_id, school_id); var parent = new ParentDetails().FindSingle(std_itself.parent_id, school_id); var cls = new ClassDetails().FindSingle(std_itself.class_id, school_id); std_itself.parent_name = parent.full_name; std_itself.class_name = cls.name; ViewBag.student = std_itself; var add_fee = (from f in fees where f.type == FeeType.EXAMINATION_FEE || f.type == FeeType.ADMISSION_FEE || f.type == FeeType.OTHER_CHARGES select f).ToList(); var monthly_fee = (from f in fees where f.type == FeeType.MONTHLY_FEE select f).ToList(); foreach (var f in add_fee) { if (f.type == FeeType.ADMISSION_FEE) f.fee = std_itself.admission_fee; if (f.type == FeeType.EXAMINATION_FEE) f.fee = std_itself.examination_fee; if (f.type == FeeType.OTHER_CHARGES) f.fee = std_itself.other_charges; } var total = 0; foreach (var f in fees) { f.fee = std_itself.monthly_fee; if (f.paid_status == FeePaidStatus.PAID) { total += f.fee; } } //to find the discount amount int discount = (int)(from std in _sd where std.user_id == student_id select std.discount).FirstOrDefault(); ViewBag.total = total - discount; ViewBag.discount = discount; ViewBag.add_fee = add_fee; return View("StudentFee", monthly_fee); } return View("StudentFee"); }
public ActionResult MineFee() { int school_id = SessionHandler.GetSchoolID(); int student_id = SessionHandler.GetUserID(); ViewBag.isSelected = true; var std_itself = new StudentDetails().FindSingle(student_id, school_id); var fees = new StudentFeeDetails().GetAll(school_id, student_id, std_itself.class_id); var parent = new ParentDetails().FindSingle(std_itself.parent_id, school_id); var cls = new ClassDetails().FindSingle(std_itself.class_id, school_id); std_itself.parent_name = parent.full_name; std_itself.class_name = cls.name; ViewBag.student = std_itself; var add_fee = (from f in fees where f.type == FeeType.EXAMINATION_FEE || f.type == FeeType.ADMISSION_FEE || f.type == FeeType.OTHER_CHARGES select f).ToList(); var total = 0; foreach (var f in add_fee) { if (f.type == FeeType.ADMISSION_FEE) f.fee = std_itself.admission_fee; if (f.type == FeeType.EXAMINATION_FEE) f.fee = std_itself.examination_fee; if (f.type == FeeType.OTHER_CHARGES) f.fee = std_itself.other_charges; if (f.paid_status == FeePaidStatus.PAID) total += f.fee; } var monthly_fee = (from f in fees where f.type == FeeType.MONTHLY_FEE select f).ToList(); foreach (var f in monthly_fee) { f.fee = std_itself.monthly_fee; if (f.paid_status == FeePaidStatus.PAID) { total += f.fee; } } //to find the discount amount int discount = std_itself.discount; ViewBag.total = total - discount; ViewBag.discount = discount; ViewBag.add_fee = add_fee; return View("MineFee", monthly_fee); }
public static IEnumerable<Student> GetParentStudent(int school_id, int class_id) { var parents = new ParentDetails().GetAll(school_id); var length = parents.Count(); string parent_ids = "("; int i = 0; foreach (var prnt in parents) { parent_ids += prnt.user_id; if ((i + 1) != length) { parent_ids += ","; } i++; } parent_ids += ")"; int indexOfComma = parent_ids.LastIndexOf(','); var _sd = new StudentDetails().GetAll(school_id, parent_ids); return _sd; }
public static IEnumerable<Parent> GetParents(int school_id) { var Parents = new ParentDetails().GetAll(school_id); return Parents; }
public Scheduler GetInitialAppointmentByClientId(ref List <Scheduler> scheduleList, Scheduler schedular) { ParentDetails parentDetails = new ParentDetails(); try { if (Connection.State == ConnectionState.Open) { Connection.Close(); } using (Connection = connection.returnConnection()) { command.Parameters.Clear(); command.Parameters.Add(new SqlParameter("@AgencyID", schedular.AgencyId)); command.Parameters.Add(new SqlParameter("@ClientId", schedular.ClientId)); command.Connection = Connection; command.CommandType = CommandType.StoredProcedure; command.CommandText = "USP_GetInitialAppointmentByClient"; Connection.Open(); _dataset = new DataSet(); DataAdapter = new SqlDataAdapter(command); DataAdapter.Fill(_dataset); Connection.Close(); } schedular.ScheduledAppointment = new Scheduler(); schedular.ParentDetailsList = new List <ParentDetails>(); schedular.MonthsList = new List <SelectListItem>(); if (_dataset != null) { if (_dataset.Tables[0].Rows.Count > 0) { schedular.ParentDetailsList = (from DataRow dr0 in _dataset.Tables[0].Rows select new ParentDetails { ParentName = dr0["ParentName"].ToString(), ParentRole = (dr0["ParentRole"].ToString() == "1") ? "Father" : (dr0["ParentRole"].ToString() == "2") ? "Mother" : (dr0["ParentRole"].ToString() == "3") ? "Grandparents" : (dr0["ParentRole"].ToString() == "4") ? "Relatives other than grandparents" : (dr0["ParentRole"].ToString() == "5") ? "Foster Parent - Not including relative" : "Other", ClientId = dr0["ClientId"].ToString() } ).ToList(); } if (_dataset.Tables.Count > 1 && _dataset.Tables[1].Rows.Count > 0) { schedular.ProgramYearStartDate = Convert.ToString(_dataset.Tables[1].Rows[0]["ProgramYearStartDate"]); } if (_dataset.Tables.Count > 2 && _dataset.Tables[2].Rows.Count > 0) { schedular.MonthsList = (from DataRow dr2 in _dataset.Tables[2].Rows select new SelectListItem { Text = Convert.ToString(dr2["MonthName"]), Value = Convert.ToString(dr2["MonthDate"]), Selected = Convert.ToBoolean(dr2["Selected"]) } ).ToList(); } scheduleList = this.GetHomeVisitAttendanceByFromDate(schedular); } } catch (Exception ex) { clsError.WriteException(ex); } finally { if (Connection != null) { Connection.Close(); } } return(schedular); }