Exemple #1
0
    private void getCommonApplication()
    {
        BL_Appt_Service myAppointmens = new BL_Appt_Service();
        MD_Appointmens  App           = myAppointmens.getAppointment(UserSession.User.AU_Code);

        if (App == null)
        {
            AppointmenEn = "No Upcoming Appointment";
        }
        else
        {
            AppointmenEn = App.AP_Time.ToString("MM/dd/yyyy HH:mm") + " " + App.CS_Style_EN;
        }
        BL_Surveys     sur     = new CRMTree.BLL.BL_Surveys();
        MD_SurveysList surList = sur.getSurveys(UserSession.User.AU_Code);

        if (surList == null)
        {
            Surveys += "<li>-";
            Surveys += " ";
            Surveys += "</li>";
        }
        else
        {
            for (int i = 0; i < surList.Surveys_List.Count; i++)
            {
                Surveys += "<li>-";
                Surveys += surList.Surveys_List[i].CG_Title + " ";
                Surveys += surList.Surveys_List[i].Dealer_Name + " ";
                Surveys += surList.Surveys_List[i].CH_Update_dt.ToString("MM/dd/yyyy");
                Surveys += "</li>";
            }
        }
    }
Exemple #2
0
        public MD_SurveysList getSurveys(long Customer_code)
        {
            string sql = @"Select CG_Title,
                                  (Select AD_Name_EN from CT_Auto_Dealers where CG_AD_OM_Code=AD_Code)as Dealer_Name,
                                  * from CT_Comm_History
                            join CT_Campaigns on CH_CG_Code=CG_Code
                            where cg_Utype=3  and CH_Status != 4 and ch_utype=44 and CH_AU_Code=@Customer_code";

            SqlParameter[] parameters = { new SqlParameter("@Customer_code", SqlDbType.BigInt) };
            parameters[0].Value = Customer_code;
            DataSet        ds = SqlHelper.ExecuteDataset(CommandType.Text, sql, parameters);
            MD_SurveysList o  = new MD_SurveysList();

            o.Surveys_List = DataHelper.ConvertToList <MD_Surveys>(ds);
            return(o);
        }