Example #1
0
    protected string[] GetSmileActivityListByBranch(string smile_branch_code)
    {
        GetAllSmileActivityList_Result obj = new GetAllSmileActivityList_Result();

        // 20111117 เปลี่ยน ApplinX Application Service เพื่อ 24 ชม.
        //WS_Admin_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[] v_list = new WS_Admin_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[0];
        //WS_Admin_ForSmartCard.WS_Admin_ForSmartCardService wsobj = new WS_Admin_ForSmartCard.WS_Admin_ForSmartCardService();
        WS_Admin_SmileService_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[] v_list = new WS_Admin_SmileService_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[0];
        WS_Admin_SmileService_ForSmartCard.WS_Admin_ForSmartCardService       wsobj  = new WS_Admin_SmileService_ForSmartCard.WS_Admin_ForSmartCardService();
        obj.fld_result = wsobj.GetAllSmileActivityList(admin_username, admin_password, smile_branch_code, out obj.fld_sessionID, out obj.fld_smile_branch_name, out v_list);

        int v_list_Length = v_list.Length;

        string[] xx = new string[v_list_Length];
        for (int i = 0; i < v_list_Length; i++)
        {
            xx[i] = v_list[i].id;
        }
        return(xx);
    }
    protected string[] GetSmileActivityListByBranch(string smile_branch_code)
    {
        GetAllSmileActivityList_Result obj = new GetAllSmileActivityList_Result();
        // 20111117 เปลี่ยน ApplinX Application Service เพื่อ 24 ชม.
        //WS_Admin_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[] v_list = new WS_Admin_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[0];
        //WS_Admin_ForSmartCard.WS_Admin_ForSmartCardService wsobj = new WS_Admin_ForSmartCard.WS_Admin_ForSmartCardService();
        WS_Admin_SmileService_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[] v_list = new WS_Admin_SmileService_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[0];
        WS_Admin_SmileService_ForSmartCard.WS_Admin_ForSmartCardService wsobj = new WS_Admin_SmileService_ForSmartCard.WS_Admin_ForSmartCardService();
        obj.fld_result = wsobj.GetAllSmileActivityList(admin_username, admin_password, smile_branch_code, out obj.fld_sessionID, out obj.fld_smile_branch_name, out v_list);

        int v_list_Length = v_list.Length;
        string[] xx = new string[v_list_Length];
        for (int i = 0; i < v_list_Length; i++)
        {
            xx[i] = v_list[i].id;
        }
        return xx;
    }
    public GetAllSmileActivityList_Result GetAllSmileActivityList(string fld_channel, string fld_partner_branch_code, string fld_partner_branch_name, string fld_smile_branch_code)
    {
        GetAllSmileActivityList_Result obj = new GetAllSmileActivityList_Result();
        RefRunningTBBLL runningobj = new RefRunningTBBLL();
        refnum = runningobj.AddRefRunningTBAndReturn();
        WSLogBLL logobj = new WSLogBLL();
        try
        {
            if (fld_channel == "" || fld_channel.ToUpper() != "SFX")
            {
                //LogRequest: Insert Log Request
                logobj.AddWSLog(fld_channel, ipaddress, "Request", "NETWS_ForPartner", "GetAllSmileActivityList", fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + fld_smile_branch_code, refnum);

                obj.fld_result = "notfound_กรุณาระบุ Channel ให้ถูกต้อง";
                //LogResponse: Insert Log Response
                logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

                return obj;
            }
            else
            {
                switch (fld_channel.ToUpper())
                {
                    case "SFX":
                        if (fld_smile_branch_code.ToUpper() != "B0Z01")
                        {
                            //LogRequest: Insert Log Request
                            logobj.AddWSLog(fld_channel, ipaddress, "Request", "NETWS_ForPartner", "GetAllSmileActivityList", fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + fld_smile_branch_code, refnum);

                            obj.fld_result = "notfound_ระบบของท่านไม่มีสิทธิ์ดูรายการกิจกรรม";
                            //LogResponse: Insert Log Response
                            logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

                            return obj;
                        }
                        else
                        {
                            try
                            {
                                //LogRequest: Insert Log Request
                                logobj.AddWSLog(fld_channel, ipaddress, "Request", "NETWS_ForPartner", "GetAllSmileActivityList", fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + fld_smile_branch_code, refnum);

                                // 20111117 เปลี่ยน ApplinX Application Service เพื่อ 24 ชม.
                                //WS_Admin_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[] v_list = new WS_Admin_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[0];
                                //WS_Admin_ForSmartCard.WS_Admin_ForSmartCardService wsobj = new WS_Admin_ForSmartCard.WS_Admin_ForSmartCardService();
                                WS_Admin_SmileService_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[] v_list = new WS_Admin_SmileService_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[0];
                                WS_Admin_SmileService_ForSmartCard.WS_Admin_ForSmartCardService wsobj = new WS_Admin_SmileService_ForSmartCard.WS_Admin_ForSmartCardService();
                                obj.fld_result = wsobj.GetAllSmileActivityList(admin_username, admin_password, fld_smile_branch_code, out obj.fld_sessionID, out obj.fld_smile_branch_name, out v_list);

                                int v_list_Length = v_list.Length;
                                SMCINQ06D_1_AllSmileActivityList[] listobj = new SMCINQ06D_1_AllSmileActivityList[v_list_Length];
                                for (int i = 0; i < v_list_Length; i++)
                                {
                                    listobj[i] = new SMCINQ06D_1_AllSmileActivityList();
                                    listobj[i].id = v_list[i].id.ToString();
                                    listobj[i].name = v_list[i].name.ToString();
                                    listobj[i].place = v_list[i].place.ToString();
                                    listobj[i].type = v_list[i].type.ToString();
                                    listobj[i].status = v_list[i].status.ToString();
                                    if (fld_smile_branch_code == "")
                                    {
                                    }
                                    else
                                    {
                                        listobj[i].seat = v_list[i].seat.ToString();
                                        listobj[i].seat_each = v_list[i].seat_each.ToString();
                                        listobj[i].seat_each_unit = v_list[i].seat_each_unit.ToString();
                                        listobj[i].remain_seat = v_list[i].remain_seat.ToString();
                                    }
                                    listobj[i].max_book_seat = v_list[i].max_book_seat.ToString();
                                    listobj[i].point = v_list[i].point.ToString();
                                    listobj[i].activity_startdate = v_list[i].activity_startdate.ToString();
                                    listobj[i].activity_enddate = v_list[i].activity_enddate.ToString();
                                    listobj[i].book_startdate = v_list[i].book_startdate.ToString();
                                    listobj[i].book_enddate = v_list[i].book_enddate.ToString();
                                    listobj[i].officer_book_startdate = v_list[i].officer_book_startdate.ToString();
                                    listobj[i].officer_book_enddate = v_list[i].officer_book_enddate.ToString();
                                    listobj[i].book_by_type = v_list[i].book_by_type.ToString();
                                    listobj[i].type_desc = v_list[i].type_desc.ToString();
                                    listobj[i].max_book_seat_pstptn = v_list[i].max_book_seat_pstptn.ToString();
                                }
                                obj.fld_all_smile_activity_list = listobj;
                                //LogResponse: Insert Log Response
                                logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

                                return obj;
                            }
                            catch (Exception ex)
                            {
                                obj.fld_result = ex.ToString();
                                //LogResponse: Insert Log Response
                                logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

                                return obj;
                            }
                        }
                        break;
                    default:
                        obj.fld_result = "notfound_ระบบของท่านไม่มีสิทธิ์ดูรายการกิจกรรม";
                        //LogResponse: Insert Log Response
                        logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

                        return obj;
                        break;
                }
            }
        }
        catch (Exception ex)
        {
            obj.fld_result = ex.ToString();
            //LogResponse: Insert Log Response
            logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

            return obj;
        }
    }
Example #4
0
    public GetAllSmileActivityList_Result GetAllSmileActivityList(string fld_channel, string fld_partner_branch_code, string fld_partner_branch_name, string fld_smile_branch_code)
    {
        GetAllSmileActivityList_Result obj = new GetAllSmileActivityList_Result();
        RefRunningTBBLL runningobj         = new RefRunningTBBLL();

        refnum = runningobj.AddRefRunningTBAndReturn();
        WSLogBLL logobj = new WSLogBLL();

        try
        {
            if (fld_channel == "" || fld_channel.ToUpper() != "TESTEDC")
            {
                //LogRequest: Insert Log Request
                logobj.AddWSLog(fld_channel, ipaddress, "Request", "NETWS_ForPartner", "GetAllSmileActivityList", fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + fld_smile_branch_code, refnum);

                obj.fld_result = "notfound_กรุณาระบุ Channel ให้ถูกต้อง";
                //LogResponse: Insert Log Response
                logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

                return(obj);
            }
            else
            {
                switch (fld_channel.ToUpper())
                {
                case "TESTEDC":
                    if (fld_smile_branch_code.ToUpper() != "B0EDC")
                    {
                        //LogRequest: Insert Log Request
                        logobj.AddWSLog(fld_channel, ipaddress, "Request", "NETWS_ForPartner", "GetAllSmileActivityList", fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + fld_smile_branch_code, refnum);

                        obj.fld_result = "notfound_ระบบของท่านไม่มีสิทธิ์ดูรายการกิจกรรม";
                        //LogResponse: Insert Log Response
                        logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

                        return(obj);
                    }
                    else
                    {
                        try
                        {
                            //LogRequest: Insert Log Request
                            logobj.AddWSLog(fld_channel, ipaddress, "Request", "NETWS_ForPartner", "GetAllSmileActivityList", fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + fld_smile_branch_code, refnum);

                            // 20111117 เปลี่ยน ApplinX Application Service เพื่อ 24 ชม.
                            //WS_Admin_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[] v_list = new WS_Admin_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[0];
                            //WS_Admin_ForSmartCard.WS_Admin_ForSmartCardService wsobj = new WS_Admin_ForSmartCard.WS_Admin_ForSmartCardService();
                            WS_Admin_SmileService_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[] v_list = new WS_Admin_SmileService_ForSmartCard.SMCINQ06D_1_AllSmileActivityList[0];
                            WS_Admin_SmileService_ForSmartCard.WS_Admin_ForSmartCardService       wsobj  = new WS_Admin_SmileService_ForSmartCard.WS_Admin_ForSmartCardService();
                            obj.fld_result = wsobj.GetAllSmileActivityList(admin_username, admin_password, fld_smile_branch_code, out obj.fld_sessionID, out obj.fld_smile_branch_name, out v_list);

                            int v_list_Length = v_list.Length;
                            SMCINQ06D_1_AllSmileActivityList[] listobj = new SMCINQ06D_1_AllSmileActivityList[v_list_Length];
                            for (int i = 0; i < v_list_Length; i++)
                            {
                                listobj[i]        = new SMCINQ06D_1_AllSmileActivityList();
                                listobj[i].id     = v_list[i].id.ToString();
                                listobj[i].name   = v_list[i].name.ToString();
                                listobj[i].place  = v_list[i].place.ToString();
                                listobj[i].type   = v_list[i].type.ToString();
                                listobj[i].status = v_list[i].status.ToString();
                                if (fld_smile_branch_code == "")
                                {
                                }
                                else
                                {
                                    listobj[i].seat           = v_list[i].seat.ToString();
                                    listobj[i].seat_each      = v_list[i].seat_each.ToString();
                                    listobj[i].seat_each_unit = v_list[i].seat_each_unit.ToString();
                                    listobj[i].remain_seat    = v_list[i].remain_seat.ToString();
                                }
                                listobj[i].max_book_seat          = v_list[i].max_book_seat.ToString();
                                listobj[i].point                  = v_list[i].point.ToString();
                                listobj[i].activity_startdate     = v_list[i].activity_startdate.ToString();
                                listobj[i].activity_enddate       = v_list[i].activity_enddate.ToString();
                                listobj[i].book_startdate         = v_list[i].book_startdate.ToString();
                                listobj[i].book_enddate           = v_list[i].book_enddate.ToString();
                                listobj[i].officer_book_startdate = v_list[i].officer_book_startdate.ToString();
                                listobj[i].officer_book_enddate   = v_list[i].officer_book_enddate.ToString();
                                listobj[i].book_by_type           = v_list[i].book_by_type.ToString();
                                listobj[i].type_desc              = v_list[i].type_desc.ToString();
                                listobj[i].max_book_seat_pstptn   = v_list[i].max_book_seat_pstptn.ToString();
                            }
                            obj.fld_all_smile_activity_list = listobj;
                            //LogResponse: Insert Log Response
                            logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

                            return(obj);
                        }
                        catch (Exception ex)
                        {
                            obj.fld_result = ex.ToString();
                            //LogResponse: Insert Log Response
                            logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

                            return(obj);
                        }
                    }
                    break;

                default:
                    obj.fld_result = "notfound_ระบบของท่านไม่มีสิทธิ์ดูรายการกิจกรรม";
                    //LogResponse: Insert Log Response
                    logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

                    return(obj);

                    break;
                }
            }
        }
        catch (Exception ex)
        {
            obj.fld_result = ex.ToString();
            //LogResponse: Insert Log Response
            logobj.AddWSLog(fld_channel, ipaddress, "Response", "NETWS_ForPartner", "GetAllSmileActivityList", obj.fld_result + "|" + fld_channel + "|" + fld_partner_branch_code + "|" + fld_partner_branch_name + "|" + obj.fld_sessionID, refnum);

            return(obj);
        }
    }