示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DietMaster objDietMaster = new DietMaster();

            objDietMaster.Operation  = 1;
            objDietMaster.CustomerID = 0;


            int i = 0;

            BusinessHelper <IDietMaster> .Use(DietMasterManager =>
            {
                i = DietMasterManager.ModifyDietMaster(objDietMaster);
            });
        }
示例#2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            DietMaster objDietMaster = PrepareDietMaster();

            objDietMaster.Operation  = 2;
            objDietMaster.CustomerID = PatientInfo.PatientID;


            int i = 0;

            BusinessHelper <IDietMaster> .Use(DietMasterManager =>
            {
                i = DietMasterManager.ModifyDietMaster(objDietMaster);
            });

            if (i == 1)
            {
                MessageBox.Show("Updated Successfully");
            }
            else
            {
                MessageBox.Show("Updated Successfully");
            }
        }
示例#3
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            DietMaster objDietMaster = PrepareDietMaster();

            objDietMaster.Operation  = 1;
            objDietMaster.CustomerID = 0;


            int i = 0;

            BusinessHelper <IDietMaster> .Use(DietMasterManager =>
            {
                i = DietMasterManager.ModifyDietMaster(objDietMaster);
            });

            if (i == 1)
            {
                MessageBox.Show("Added Successfully");
            }
            else
            {
                MessageBox.Show("Added Successfully");
            }

            /*
             *
             * //Add Customer Details
             * CustomerDetail objCustDetail = new CustomerDetail();
             * //objCustDetail.CustomerID = Convert.ToInt32(txtPatientID.Text);
             * //objCustDetail.CustomerName = txtPatientName.Text;
             * //objCustDetail.CustomerAge = Convert.ToInt32(txtPatientAge.Text);
             * //objCustDetail.Gender=cmbGender.SelectedIndex;
             * //objCustDetail.DOB = Convert.ToDateTime(txtDOB.Text);
             * //objCustDetail.Address = txtAddress.Text;
             * //objCustDetail.Profession = cmbProfession.SelectedItem.ToString();
             * //objCustDetail.Email = txtEmail.Text;
             * //objCustDetail.Contact = txtContact.Text;
             * //objCustDetail.PresentExercise = txtPresentExcercise.Text;
             * //objCustDetail.ExersizeActivity = txtExcerciseActivity.Text;
             * //objCustDetail.NatureOfActivity = cmbNatureOfActivity.SelectedItem.ToString();
             *
             * objCustDetail.CustomerID = 0;
             * objCustDetail.CustomerName = "Prashant";
             * objCustDetail.CustomerAge = 25;
             * objCustDetail.Gender = 0;
             * objCustDetail.DOB = Convert.ToDateTime("5/8/1989");
             * objCustDetail.Address = "Wadala";
             * objCustDetail.Profession = "Farming";
             * objCustDetail.Email = "*****@*****.**";
             * objCustDetail.Contact = "9867815161";
             * objCustDetail.PresentExercise = "Yoga";
             * objCustDetail.ExersizeActivity = "Padmasan";
             * objCustDetail.NatureOfActivity = "a. Sedentary( little or no exercise)";
             *
             * int i=0;
             * BusinessHelper<ICustomerDetail>.Use(CustomerDetailManager =>
             *  {
             *       i=CustomerDetailManager.ModifyCustomerDetail(objCustDetail);
             *  });
             * int c = i;
             *
             * //Add Anthropometrics details
             * Anthropometrics objAnthropometrics = new Anthropometrics();
             * objAnthropometrics.Operation = 1;
             *
             * //objAnthropometrics.CustomerID = 0;
             * //objAnthropometrics.MeasuredWeight = Convert.ToInt32(txtMeasuredWeight.Text);
             * //objAnthropometrics.MeasuredHeight = Convert.ToInt32(txtMeasuredHeight.Text);
             * //objAnthropometrics.IdealBodyWeight = Convert.ToInt32(txtIdealBodyWeight.Text);
             * //objAnthropometrics.CalculatedBMI = Convert.ToInt32(txtCalculatedBMI.Text);
             * //objAnthropometrics.BMICategory = cmbBMICategory.SelectedItem.ToString();
             * //objAnthropometrics.MeasuredWaist=Convert.ToInt32(txtMeasuredWaist.Text);
             * //objAnthropometrics.WeightGainInMonth = Convert.ToInt32(txtWeightGainInLastOneMonth.Text);
             * //objAnthropometrics.WeightGainInSixMonth=Convert.ToInt32(txtWeightGainInLastSixMonths.Text);
             * //objAnthropometrics.WeightGainInYear = Convert.ToInt32(txtWeightGainInLastYear.Text);
             * //objAnthropometrics.WeightLossInMonth = Convert.ToInt32(txtWeightGainInLastOneMonth.Text);
             * //objAnthropometrics.WeightGainInSixMonth = Convert.ToInt32(txtWeighLossInLastSixMonths.Text);
             * //objAnthropometrics.WeightLossInYear = Convert.ToInt32(txtWeighLossInLastYear.Text);
             * //objAnthropometrics.NeckCircumference = Convert.ToInt32(txtNeckCircumference.Text);
             * //objAnthropometrics.MUAC = Convert.ToInt32(txtMUAC.Text);
             * //objAnthropometrics.BloodPressure = Convert.ToInt32(txtBloodPressure.Text);
             *
             *
             * //dummy Data
             * objAnthropometrics.AnthropometricID = 0;
             * objAnthropometrics.CustomerID = 0;
             * objAnthropometrics.MeasuredWeight = 0;
             * objAnthropometrics.MeasuredHeight = 0;
             * objAnthropometrics.IdealBodyWeight = 0;
             * objAnthropometrics.CalculatedBMI = 0;
             * objAnthropometrics.BMICategory = "Normal BMI";
             * objAnthropometrics.MeasuredWaist = 0;
             * objAnthropometrics.WeightGainInMonth = 0;
             * objAnthropometrics.WeightGainInSixMonth = 0;
             * objAnthropometrics.WeightGainInYear = 0;
             * objAnthropometrics.WeightLossInMonth = 0;
             * objAnthropometrics.WeightGainInSixMonth = 0;
             * objAnthropometrics.WeightLossInYear = 0;
             * objAnthropometrics.NeckCircumference = 0;
             * objAnthropometrics.MUAC = 0;
             * objAnthropometrics.BloodPressure = 0;
             *
             * i = 0;
             * BusinessHelper<IAnthropometrics>.Use(AnthropometricsManager =>
             * {
             *  i = AnthropometricsManager.ModifyAnthropometrics(objAnthropometrics);
             * });
             *
             * //Add BioChemical Details
             *
             *
             * */
        }