Пример #1
0
    public static int DeleteApp(string AP_Code)
    {
        CRMTree.BLL.BL_Appt_Service App = new CRMTree.BLL.BL_Appt_Service();
        int i = App.DeleteAppointmens(int.Parse(AP_Code));

        return(i);
    }
Пример #2
0
        /// <summary>
        /// 用前台参数替换报表
        /// </summary>
        /// <param name="o"></param>
        /// <param name="Paramterslist"></param>
        /// <returns></returns>
        private static MD_ReportList NameDescReplace_Page(MD_ReportList o, string Paramterslist, bool isEn = true)
        {
            string[] ParamtersArray = Paramterslist.Split(',');
            int      Pa             = 0;

            if (ParamtersArray.Length <= 0)
            {
                return(null);
            }
            for (int i = 0; i < o.CT_Reports_List.Count; i++)
            {
                if (isNull(o.CT_Reports_List[i].PL_Tag))
                {
                    Pa++;
                    continue;
                }
                if (i != 0 && o.CT_Reports_List[i].RP_Code == o.CT_Reports_List[i - 1].RP_Code)
                {
                    o = oRowRemove(o, i);
                    i = i - 1;
                }
                if (o.CT_Reports_List[i].PL_Type == 10)
                {
                    string _v = BL_MyCar.getMake_Model_Style(1, int.Parse(ParamtersArray[Pa].ToString()), isEn);
                    o = oReplace(o, i, _v);
                }
                else if (o.CT_Reports_List[i].PL_Type == 11)
                {
                    string _v = BL_MyCar.getMake_Model_Style(2, int.Parse(ParamtersArray[Pa].ToString()), isEn);
                    o = oReplace(o, i, _v);
                }
                else if (o.CT_Reports_List[i].PL_Type == 12)
                {
                    string _v = BL_MyCar.getMake_Model_Style(3, int.Parse(ParamtersArray[Pa].ToString()), isEn);
                    o = oReplace(o, i, _v);
                }
                else if (o.CT_Reports_List[i].PL_Type == 14)
                {
                    string _v = new BL_Appt_Service().GetAdviserName(ParamtersArray[Pa].ToString());
                    o = oReplace(o, i, _v);
                }
                else if (o.CT_Reports_List[i].PL_Type == 20)
                {
                    string _v = new BL_Appt_Service().Get_PeriodicalsText(ParamtersArray[Pa].ToString());
                    o = oReplace(o, i, _v);
                }
                else
                {
                    o = oReplace(o, i);
                }
                Pa++;
            }
            return(o);
        }
Пример #3
0
 public static Object getServCateList()
 {
     CRMTree.BLL.BL_Appt_Service myAppointmens = new CRMTree.BLL.BL_Appt_Service();
     CRMTree.Model.Appointmens.MD_ServCategoryList myServCateList = myAppointmens.getServList();
     if (myServCateList != null && !Intern)
     {
         for (int i = 0; i < myServCateList.Serv_Category_List.Count; i++)
         {
             myServCateList.Serv_Category_List[i].SC_Desc_EN = myServCateList.Serv_Category_List[i].SC_Desc_CN;
         }
     }
     return(myServCateList);
 }
Пример #4
0
    public static Object MyDealerList(string AU_Code)
    {
        CRMTree.BLL.BL_Appt_Service myAppointmens = new CRMTree.BLL.BL_Appt_Service();

        CRMTree.Model.Appointmens.MD_DealerList myDealerList = myAppointmens.getDealerList(Convert.ToInt64(userCode));
        if (myDealerList != null && !Intern)
        {
            for (int i = 0; i < myDealerList.Dealers_List.Count; i++)
            {
                myDealerList.Dealers_List[i].AD_Name_EN = myDealerList.Dealers_List[i].AD_Name_CN;
            }
        }
        return(myDealerList);
    }
Пример #5
0
 public static Object getMaintenancePack(string AD_Code)
 {
     CRMTree.Model.CT_Maintenance_Pack MaintenancePack = new CRMTree.Model.CT_Maintenance_Pack();
     MaintenancePack.MP_AD_Code = int.Parse(AD_Code);
     CRMTree.BLL.BL_Appt_Service myAppointmens = new CRMTree.BLL.BL_Appt_Service();
     CRMTree.Model.Appointmens.MD_MaintenancePackList myMaintenancePackList = myAppointmens.getMaintenancePackList(MaintenancePack);
     if (myMaintenancePackList != null && !Intern)
     {
         for (int i = 0; i < myMaintenancePackList.Maintenance_Pack_List.Count; i++)
         {
             myMaintenancePackList.Maintenance_Pack_List[i].MP_Desc_EN = myMaintenancePackList.Maintenance_Pack_List[i].MP_Desc_CN;
         }
     }
     return(myMaintenancePackList);
 }
Пример #6
0
 public static Object getServiceType(string SC_Code, string AD_Code)
 {
     CRMTree.Model.CT_Service_Types ServiceType = new CRMTree.Model.CT_Service_Types();
     ServiceType.ST_SC_Code = int.Parse(SC_Code);
     ServiceType.ST_AD_Code = int.Parse(AD_Code);
     CRMTree.BLL.BL_Appt_Service myAppointmens = new CRMTree.BLL.BL_Appt_Service();
     CRMTree.Model.Appointmens.MD_ServiceTypesList myServiceTypesList = myAppointmens.getServiceTypesList(ServiceType);
     if (myServiceTypesList != null && !Intern)
     {
         for (int i = 0; i < myServiceTypesList.Service_Types_List.Count; i++)
         {
             myServiceTypesList.Service_Types_List[i].ST_Desc_EN = myServiceTypesList.Service_Types_List[i].ST_Desc_CN;
         }
     }
     return(myServiceTypesList);
 }
Пример #7
0
 /// <summary>
 /// 用后台参数替换报表
 /// </summary>
 /// <param name="o"></param>
 /// <returns></returns>
 private static MD_ReportList NameDescReplace_Background(MD_ReportList o, bool isEn = true)
 {
     for (int i = 0; i < o.CT_Reports_List.Count; i++)
     {
         if (isNull(o.CT_Reports_List[i].PL_Tag))
         {
             continue;
         }
         if (i != 0 && o.CT_Reports_List[i].RP_Code == o.CT_Reports_List[i - 1].RP_Code)
         {
             o = oRowRemove(o, i);
             i = i - 1;
         }
         if (o.CT_Reports_List[i].PL_Type == 10)
         {
             string _v = BL_MyCar.getMake_Model_Style(1, int.Parse(o.CT_Reports_List[i].PL_Default), isEn);
             o = oReplace(o, i, _v);
         }
         else if (o.CT_Reports_List[i].PL_Type == 11)
         {
             string _v = BL_MyCar.getMake_Model_Style(2, int.Parse(o.CT_Reports_List[i].PL_Default), isEn);
             o = oReplace(o, i, _v);
         }
         else if (o.CT_Reports_List[i].PL_Type == 12)
         {
             string _v = BL_MyCar.getMake_Model_Style(3, int.Parse(o.CT_Reports_List[i].PL_Default), isEn);
             o = oReplace(o, i, _v);
         }
         else if (o.CT_Reports_List[i].PL_Type == 14)
         {
             string _v = new BL_Appt_Service().GetAdviserName(o.CT_Reports_List[i].PL_Default);
             o = oReplace(o, i, _v);
         }
         else if (o.CT_Reports_List[i].PL_Type == 20)
         {
             string _v = new BL_Appt_Service().Get_PeriodicalsText(o.CT_Reports_List[i].PL_Default);
             o = oReplace(o, i, _v);
         }
         else
         {
             o = oReplace(o, i);
         }
     }
     return(o);
 }
Пример #8
0
 public static Object AddApp(string Data, string type)
 {
     CRMTree.BLL.BL_Appt_Service   myAppointmens = new CRMTree.BLL.BL_Appt_Service();
     CRMTree.Model.CT_Appt_Service App           = new CRMTree.Model.CT_Appt_Service();
     string[] Datas = Data.Split(',');
     App.AP_AU_Code = userCode;
     App.AP_CI_Code = int.Parse(Datas[0].ToString());
     App.AP_AD_Code = int.Parse(Datas[1].ToString());
     App.AP_Time    = Convert.ToDateTime(Datas[2].ToString() + " " + Datas[3].ToString());
     if (string.IsNullOrEmpty(Datas[4].ToString()))
     {
         App.AP_SA_Selected = null;
     }
     else
     {
         App.AP_SA_Selected = int.Parse(Datas[4].ToString());
     }
     if (int.Parse(type) == 1)
     {
         App.AP_MP_Code = int.Parse(Datas[5].ToString());
     }
     else
     {
         if (string.IsNullOrEmpty(Datas[5].ToString()))
         {
             App.AP_ST_Code = null;
         }
         else
         {
             App.AP_ST_Code = int.Parse(Datas[5].ToString());
         }
     }
     App.AP_Transportation = null;
     CRMTree.Model.CT_Appt_Service Apps = myAppointmens.InsertApp(App);
     return(Apps);
 }
Пример #9
0
 public static Object MyCarStyke(string CarId)
 {
     CRMTree.BLL.BL_Appt_Service myAppointmens = new CRMTree.BLL.BL_Appt_Service();
     CRMTree.Model.Appointmens.MD_AppointmensList myCarStyle = myAppointmens.getMyCarStyle(6);
     return(myCarStyle);
 }
Пример #10
0
 public static Object MyAdviserList(int AD_code)
 {
     CRMTree.BLL.BL_Appt_Service myAppointmens = new CRMTree.BLL.BL_Appt_Service();
     CRMTree.Model.Appointmens.MD_AdviserList myAdviserList = myAppointmens.getAdviserList(AD_code);
     return(myAdviserList);
 }