private void remove_v_dm_black_list()
        {
            if (!HelpUtils.is_validated_edit_grid_row(m_fg.Row, m_fg))
            {
                return;
            }
            if (!BaseMessages.MsgBox_Confirm(THONG_BAO.CF_REMOVE_BLACKLIST))
            {
                return;
            }
            US_V_DM_BLACK_LIST v_us = new US_V_DM_BLACK_LIST();

            grid2us_object(v_us, m_fg.Row);
            try {
                v_us.BeginTransaction();
                CAddRemoveBlackListData v_add_bl_data = new CAddRemoveBlackListData();
                v_add_bl_data = CallCenterUtils.add_remove_blacklist(v_us.strSO_DIEN_THOAI, 20);
                if (v_add_bl_data.Status == TRANG_THAI_GOI_WS.THAT_BAI)
                {
                    BaseMessages.MsgBox_Infor(THONG_BAO.ER_REMOVE_BLACKLIST_KO_THANH_CONG);
                    HelpUtils.ghi_log_he_thong(LOG_TRUY_CAP.REMOVE_BLACKLIST, "BLACK_LIST", "Remove blacklist: " + m_us.strSO_DIEN_THOAI, "Error");
                    return;
                }
                v_us.dcID_NGUOI_REMOVE = CAppContext_201.getCurrentUserID();
                v_us.Update();
                HelpUtils.ghi_log_he_thong(LOG_TRUY_CAP.REMOVE_BLACKLIST, "BLACK_LIST", "Remove blacklist: " + m_us.strSO_DIEN_THOAI, "Remove");
                BaseMessages.MsgBox_Infor(THONG_BAO.SC_REMOVE_BLACKLIST_THANH_CONG);
                v_us.CommitTransaction();
                load_data_2_grid();
            }
            catch (Exception v_e) {
                v_us.Rollback();
                CSystemLog_100.ExceptionHandle(v_e);
            }
        }
        private void insert_v_dm_black_list()
        {
            int v_i_check_validate = check_validate();

            switch (v_i_check_validate)
            {
            case 0:
                break;

            case 1:
                if (!BaseMessages.MsgBox_Confirm(THONG_BAO.CF_ADD_BLACKLIST))
                {
                    return;
                }
                form_2_us_obj();
                try
                {
                    CAddRemoveBlackListData v_add_bl_data = new CAddRemoveBlackListData();
                    v_add_bl_data = CallCenterUtils.add_remove_blacklist(m_us.strSO_DIEN_THOAI, 10);
                    if (v_add_bl_data.Status == TRANG_THAI_GOI_WS.THAT_BAI)
                    {
                        BaseMessages.MsgBox_Infor(THONG_BAO.ER_KHONG_ADD_BLACKLIST_DUOC);
                        HelpUtils.ghi_log_he_thong(LOG_TRUY_CAP.ADD_BLACKLIST, "BLACK_LIST", "Add blacklist: " + m_us.strSO_DIEN_THOAI, "Error");
                        break;
                    }
                    m_us.readd_black_list();
                    HelpUtils.ghi_log_he_thong(LOG_TRUY_CAP.ADD_BLACKLIST, "BLACK_LIST", "Add blacklist: " + m_us.strSO_DIEN_THOAI, "Readd");
                    BaseMessages.MsgBox_Infor(THONG_BAO.SC_ADD_BLACKLIST_THANH_CONG);
                }
                catch (Exception v_e)
                {
                    CSystemLog_100.ExceptionHandle(v_e);
                }
                break;

            case 2:
                form_2_us_obj();
                try
                {
                    CAddRemoveBlackListData v_add_bl_data = new CAddRemoveBlackListData();
                    v_add_bl_data = CallCenterUtils.add_remove_blacklist(m_us.strSO_DIEN_THOAI, 10);
                    if (v_add_bl_data.Status == TRANG_THAI_GOI_WS.THAT_BAI)
                    {
                        BaseMessages.MsgBox_Infor(THONG_BAO.ER_KHONG_ADD_BLACKLIST_DUOC);
                        HelpUtils.ghi_log_he_thong(LOG_TRUY_CAP.ADD_BLACKLIST, "BLACK_LIST", "Add blacklist: " + m_us.strSO_DIEN_THOAI, "Error");
                        break;
                    }
                    m_us.Insert();
                    HelpUtils.ghi_log_he_thong(LOG_TRUY_CAP.ADD_BLACKLIST, "BLACK_LIST", "Add blacklist: " + m_us.strSO_DIEN_THOAI, "Add");
                    BaseMessages.MsgBox_Infor(THONG_BAO.SC_ADD_BLACKLIST_THANH_CONG);
                }
                catch (Exception v_e)
                {
                    CSystemLog_100.ExceptionHandle(v_e);
                }
                break;
            }
            load_data_2_grid();
            reset_form();
        }
Пример #3
0
 private void dang_xuat(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     us_user.trang_thai_dang_nhap = false;
     if (us_user.ipphone != null && us_user.ipphone != "" && us_user.strTEN_TRUY_CAP != "")
     {
         CallCenterUtils.add_or_remove_agent_ipphone_2_queue(us_user.ipphone.ToString(), us_user.strTEN_TRUY_CAP, KHO_QUEUE.MIEN_BAC, 20);
     }
     this.Close();
 }
Пример #4
0
        private void check_incoming_call()
        {
            try
            {
                string m_str_stationId = us_user.ipphone; //ip-phone

                string v_str_link_services = "";

                v_str_link_services = "http://203.162.121.70:8080/TPCServer/tpc/DoAction.jsp?event=" + WEB_URL_CALL_CENTER.GET_INCOMING_CALL(m_str_stationId);

                string v_str_output = CallCenterUtils.get_incoming_call(v_str_link_services).Data;

                US_GD_CUOC_GOI_YEU_CAU m_us_gd_cuoc_goi_yc = new US_GD_CUOC_GOI_YEU_CAU();
                if (v_str_output == "")
                {
                    return;
                }
                CallInfor v_obj_callinfo = HelpUtils.get_start_callinfo_from_client_string_call(v_str_output);
                if (v_obj_callinfo.mobile_phone == "Anonymous")
                {
                    return;
                }

                if (m_us_gd_cuoc_goi_yc.is_call_id_exist(v_obj_callinfo.call_id))
                {
                    return;
                }
                if (v_obj_callinfo.call_id == "" ||
                    v_obj_callinfo.call_id == null)
                {
                    return;
                }

                HelpUtils.ghi_log_he_thong(v_str_output, "");
                //// ghi log gọi điện

                m_timer_imcoming_call.Enabled = false;
                f100_don_dat_hang_new v_f = new f100_don_dat_hang_new();
                v_f.display_for_ipphone(v_obj_callinfo);

                // HelpUtils.open_form_sinh_vien_call(v_obj_callinfo);
                m_timer_imcoming_call.Enabled = true;
            }
            catch (Exception v_e)
            {
                CSystemLog_100.ExceptionHandle(v_e);
            }
        }
Пример #5
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         if (m_tb_ipphone.Text != "")
         {
             //check ipphone còn đã active chưa.
             CallCenterUtils.add_or_remove_agent_ipphone_2_queue(m_tb_ipphone.Text, us_user.strTEN_TRUY_CAP, KHO_QUEUE.MIEN_BAC, 10);
             us_user.ipphone = m_tb_ipphone.Text;
             this.Close();
         }
         else
         {
             MessageBox.Show("Mã ipphone còn trống");
         }
     }
     catch (Exception v_e)
     {
         CSystemLog_301.ExceptionHandle(v_e);
     }
 }
Пример #6
0
        static void Main()
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture =
                new System.Globalization.CultureInfo("vi-VN");

            // The following line provides localization for data formats.
            System.Threading.Thread.CurrentThread.CurrentCulture =
                new System.Globalization.CultureInfo("vi-VN");
            try
            {
                TOSApp.HT.f000_login v_f = new HT.f000_login();
                Application.Run(v_f);
                if (us_user.ipphone != null && us_user.ipphone != "" && us_user.strTEN_TRUY_CAP != "")
                {
                    CallCenterUtils.add_or_remove_agent_ipphone_2_queue(us_user.ipphone.ToString(), us_user.strTEN_TRUY_CAP, KHO_QUEUE.MIEN_BAC, 20);
                }
            }
            catch (Exception v_e)
            {
                CSystemLog_100.ExceptionHandle(v_e);
            }
        }