Example #1
0
        public void ScatterData()
        {
            DoBlanks();
            TBL_MP_CRM_Followup_Master model = (new ServiceFollowUps()).GetFollowupInfoByFollowUpID(this.FollowupID);

            if (model != null)
            {
                cboActions.SelectedItem    = ((List <SelectListItem>)cboActions.DataSource).Where(x => x.ID == model.FK_Action).FirstOrDefault();
                cboReminders.SelectedItem  = ((List <SelectListItem>)cboReminders.DataSource).Where(x => x.ID == model.FK_Reminder).FirstOrDefault();
                cboCallStatus.SelectedItem = ((List <SelectListItem>)cboCallStatus.DataSource).Where(x => x.ID == model.FK_Status).FirstOrDefault();
                txtSubject.Text            = model.Subject;

                dtScheduleStartDatetime.Value = AppCommon.ConvertToDateTime(model.FollowupStartDate, model.FollowupStartTime);
                dtScheduleEndDatetime.Value   = AppCommon.ConvertToDateTime(model.FollowupEndDate, model.FollowupEndTime);

                txtCustomerName.Text    = model.CustomerName;
                txtContactPerson.Text   = model.ContactPersone;
                txtContactNumbers.Text  = model.ContactNo;
                txtResultofActions.Text = model.ActionPlanResult;
                if ((bool)model.ISNextFollowupRequired)
                {
                    btnNextFollowUpRequired.Checked = ComponentFactory.Krypton.Toolkit.ButtonCheckState.Checked;

                    dtNExtScheduleStartDatetime.Value = AppCommon.ConvertToDateTime(model.NEXT_FollowupStartDate, model.NEXT_FollowupStartTime);
                    dtNextScheduleEndDatetime.Value   = AppCommon.ConvertToDateTime(model.NEXT_FollowupEndDate, model.NEXT_FollowupEndTime);
                    txtNextResultOfAction.Text        = model.NEXT_ActionPlanResult;
                }
                else
                {
                    btnNextFollowUpRequired.Checked     = ComponentFactory.Krypton.Toolkit.ButtonCheckState.Unchecked;
                    dtNExtScheduleStartDatetime.Checked = false;
                    dtNextScheduleEndDatetime.Checked   = false;
                }
            }
        }