Ejemplo n.º 1
0
        /// <summary>
        /// This method just show plan's data in fields of screen
        /// </summary>
        private void ShowPlan()
        {
            planManager = new PlanManager(this);

            originalPlan = planManager.GetPlan(Convert.ToInt32(Request["PlanId"]));


            txtName.Text = originalPlan.Name;
            ucDateTimeInterval.DateInterval = new DateTimeInterval(originalPlan.AvailableStartDate, originalPlan.AvailableEndDate);

            // cboBranch.SelectedValue = Convert.ToString(originalPlan.BranchId);
            cboApplication.SelectedValue = Convert.ToString(originalPlan.ApplicationId);
            cboPackage.SelectedValue = Convert.ToString(originalPlan.PackageId);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This method just show plan's data in fields of screen
        /// </summary>
        private void ShowPlan()
        {
            planManager = new PlanManager(this);

            originalPlan = planManager.GetPlan(Convert.ToInt32(Request["PlanId"]));


            txtName.Text = originalPlan.Name;
            ucDateTimeInterval.DateInterval = new DateTimeInterval(originalPlan.AvailableStartDate, originalPlan.AvailableEndDate);

            // cboBranch.SelectedValue = Convert.ToString(originalPlan.BranchId);
            cboApplication.SelectedValue = Convert.ToString(originalPlan.ApplicationId);
            cboPackage.SelectedValue     = Convert.ToString(originalPlan.PackageId);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// This method fill an new plan object and send them to bd for update or insert
        /// </summary>
        private void SavePlan()
        {
            planManager = new PlanManager(this);

            plan = new DataClasses.Plan();
            if(!String.IsNullOrEmpty(Request["PlanId"]))
               plan =  planManager.GetPlan(Convert.ToInt32(Request["PlanId"]));

            plan.Name = txtName.Text;
            plan.AvailableStartDate = ucDateTimeInterval.DateInterval.BeginDate;
            plan.AvailableEndDate = ucDateTimeInterval.DateInterval.EndDate;
            plan.ApplicationId = Convert.ToInt32(cboApplication.SelectedValue);
            plan.PackageId = Convert.ToInt32(cboPackage.SelectedValue);

            planManager.Save(plan);

            Response.Redirect("Plans.aspx");

        }
Ejemplo n.º 4
0
        /// <summary>
        /// This method fill an new plan object and send them to bd for update or insert
        /// </summary>
        private void SavePlan()
        {
            planManager = new PlanManager(this);

            plan = new DataClasses.Plan();
            if (!String.IsNullOrEmpty(Request["PlanId"]))
            {
                plan = planManager.GetPlan(Convert.ToInt32(Request["PlanId"]));
            }

            plan.Name = txtName.Text;
            plan.AvailableStartDate = ucDateTimeInterval.DateInterval.BeginDate;
            plan.AvailableEndDate   = ucDateTimeInterval.DateInterval.EndDate;
            plan.ApplicationId      = Convert.ToInt32(cboApplication.SelectedValue);
            plan.PackageId          = Convert.ToInt32(cboPackage.SelectedValue);

            planManager.Save(plan);

            Response.Redirect("Plans.aspx");
        }