Exemplo n.º 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;
                }
            }
        }
Exemplo n.º 2
0
        public TBL_MP_CRM_Followup_Master GetFollowupInfoByFollowUpID(int followupID)
        {
            TBL_MP_CRM_Followup_Master model = _dbContext.TBL_MP_CRM_Followup_Master.Where(x => x.PK_FollowupID == followupID).FirstOrDefault();

            return(model);
        }