示例#1
0
 void m_cmd_nghe_lai_Click(object sender, EventArgs e)
 {
     try
     {
         int v_i_row = 0;
         if (m_fg.Rows[m_fg.Row].IsNode)
         {
             v_i_row = m_fg.Row - 1;
         }
         else
         {
             v_i_row = m_fg.Row;
         }
         if (!HelpUtils.is_validated_edit_grid_row(v_i_row, m_fg))
         {
             return;
         }
         grid2us_object(m_us, v_i_row);
         US_GD_CUOC_GOI_YEU_CAU v_us_cuoc_goi = new US_GD_CUOC_GOI_YEU_CAU(m_us.dcID_YEU_CAU);
         HelpUtils.open_link_in_default_browser(HelpUtils.get_file_record(v_us_cuoc_goi.strVOICE_CALL_LINK));
     }
     catch (Exception)
     {
         BaseMessages.MsgBox_Infor("Link file ghi âm không tồn tại");
     }
 }
示例#2
0
    private void load_data_2_grid()
    {
        m_us = new US_GD_CUOC_GOI_YEU_CAU();

        decimal  v_dc_id_nguoi_dung = CIPConvert.ToDecimal(m_ddl_dien_thoai_vien.SelectedValue);
        DateTime v_dat_tu_ngay, v_dat_den_ngay;

        if (m_dat_tu_ngay.SelectedDate != CIPConvert.ToDatetime("01/01/0001"))
        {
            v_dat_tu_ngay = Convert.ToDateTime(m_dat_tu_ngay.SelectedDate);
        }
        else
        {
            v_dat_tu_ngay = Convert.ToDateTime("01/01/1900");
        }

        if (m_dat_den_ngay.SelectedDate != CIPConvert.ToDatetime("01/01/0001"))
        {
            v_dat_den_ngay = Convert.ToDateTime(m_dat_den_ngay.SelectedDate);
        }
        else
        {
            v_dat_den_ngay = Convert.ToDateTime("01/01/1900");
        }


        m_ds_bc_cham_cong = m_us.load_bao_cao_cham_cong(v_dat_tu_ngay, v_dat_den_ngay, v_dc_id_nguoi_dung);

        // Load table header
        m_str_table_cham_cong  = "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"1px\" border-style=\"solid\" border-collapse=\"collapse\">";
        m_str_table_cham_cong += "\n <thead style='background-color:#810C15; color:White; text-align:center; font-weight:bold;'>";
        m_str_table_cham_cong += "\n <tr style='height:28px;'>";
        for (int v_i = 0; v_i < m_ds_bc_cham_cong.Tables[0].Columns.Count; v_i++)
        {
            m_str_table_cham_cong += "\n <td>" + m_ds_bc_cham_cong.Tables[0].Rows[0][v_i].ToString() + "</td>";
        }
        m_str_table_cham_cong += "\n </tr>";
        m_str_table_cham_cong += "\n </thead>";

        // Load Table Body
        for (int v_i = 1; v_i < m_ds_bc_cham_cong.Tables[0].Rows.Count; v_i++)
        {
            m_str_table_cham_cong += "\n <tr style='height:28px;'>";

            load_cham_cong_by_ngay(v_i);

            m_str_table_cham_cong += "\n </tr>";
        }

        // Load footer của Table
        m_str_table_cham_cong += "\n </table>";
    }
示例#3
0
    private void loadTieuDe(ref string strTable)
    {
        m_us = new US_GD_CUOC_GOI_YEU_CAU();

        decimal  v_dc_id_nguoi_dung = CIPConvert.ToDecimal(m_ddl_dien_thoai_vien.SelectedValue);
        DateTime v_dat_tu_ngay, v_dat_den_ngay;

        if (m_dat_tu_ngay.SelectedDate != CIPConvert.ToDatetime("01/01/0001"))
        {
            v_dat_tu_ngay = Convert.ToDateTime(m_dat_tu_ngay.SelectedDate);
        }
        else
        {
            v_dat_tu_ngay = Convert.ToDateTime("01/01/1900");
        }

        if (m_dat_den_ngay.SelectedDate != CIPConvert.ToDatetime("01/01/0001"))
        {
            v_dat_den_ngay = Convert.ToDateTime(m_dat_den_ngay.SelectedDate);
        }
        else
        {
            v_dat_den_ngay = Convert.ToDateTime("01/01/1900");
        }


        m_ds_bc_cham_cong = m_us.load_bao_cao_cham_cong(v_dat_tu_ngay, v_dat_den_ngay, v_dc_id_nguoi_dung);

        strTable += "<table cellpadding='2' cellspacing='0' class='cssTableReport'>";

        strTable += "\n<tr>";
        strTable += "\n<td colspan='6'  align='center'><class='cssTableView' style='width: 100%;  height: 40px; font-size: large; color:White; background-color:#810C15;' nowrap='wrap'><span style='font-family:Times New Roman; font-weight:bold; font-size:1.3em;'>BÁO CÁO CHẤM CÔNG" + "</span></td>";
        strTable += "\n</tr>";
        //
        strTable += "\n<tr>";
        strTable += "\n<td colspan='3' align='center'><class='cssTableView' style='width:100%;' nowrap='nowrap'> <span style='font-family:Times New Roman; font-size:1.0em'>Từ ngày: " + v_dat_tu_ngay.ToShortDateString() + "</span></td>";
        strTable += "\n<td colspan='3' align='center'><class='cssTableView' style='width:100%;' nowrap='nowrap'> <span style='font-family:Times New Roman; font-size:1.0em'>đến ngày: " + v_dat_den_ngay.ToShortDateString() + "</span></td>";
        strTable += "\n</tr>";
        strTable += "\n</table>";
        //table noi dung
        strTable += "<table cellpadding='2' cellspacing='0' class='cssTableReport'>";
        strTable += "\n<tr>";
        for (int v_i = 0; v_i < m_ds_bc_cham_cong.Tables[0].Columns.Count; v_i++)
        {
            strTable += "\n<td style='width:12%;' class='cssTableView' nowrap='nowrap'>" + m_ds_bc_cham_cong.Tables[0].Rows[0][v_i].ToString() + "</td>";
        }
        strTable += "\n</tr>";
        loadDSExprort(ref strTable);
        strTable += "\n</table>";
    }
示例#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);
            }
        }
        private bool check_lich_su_cuoc_goi(string i_str_dien_thoai)
        {
            US_GD_CUOC_GOI_YEU_CAU v_us_cuoc_goi = new US_GD_CUOC_GOI_YEU_CAU();
            DS_GD_CUOC_GOI_YEU_CAU v_ds_cuoc_goi = new DS_GD_CUOC_GOI_YEU_CAU();

            v_us_cuoc_goi.FillDataset(v_ds_cuoc_goi, "where SO_DIEN_THOAI = '" + i_str_dien_thoai
                                      + "' and HO_TEN_SINH_VIEN = 'Chua xac dinh' and THOI_DIEM_GOI = 1 order by ID desc");

            //v_us_cuoc_goi.FillDataset(v_ds_cuoc_goi, "where SO_DIEN_THOAI = '" + i_str_dien_thoai.Replace(" ","").Trim()
            //    + "' order by START_TIME desc");

            // Nếu ko có cuộc gọi nào chưa nhập thì thông báo sai số điện thoại, bắt nhập lại
            if (v_ds_cuoc_goi.GD_CUOC_GOI_YEU_CAU.Rows.Count == 0)
            {
                BaseMessages.MsgBox_Error("Không có cuộc gọi nào từ số " + i_str_dien_thoai + " mà chưa được xử lý");
                m_txt_dien_thoai.Focus();
                return(false);
            }
            // Nếu có cuộc gọi chưa nhập thì load lịch sử gọi lên và load thông tin học viên lên form
            else
            {
                // Set ID cuộc gọi
                m_call_id          = CIPConvert.ToStr(v_ds_cuoc_goi.GD_CUOC_GOI_YEU_CAU.Rows[0][GD_CUOC_GOI_YEU_CAU.CALL_ID]);
                m_us_cuoc_goi.dcID = CIPConvert.ToDecimal(v_ds_cuoc_goi.GD_CUOC_GOI_YEU_CAU.Rows[0][GD_CUOC_GOI_YEU_CAU.ID]);
                // Search thông tin sinh viên từ SCM
                SinhVien v_obj_sinhvien = new SinhVien();
                SyncData v_ws_scm       = new SyncData();
                string   v_str_search   = HelpUtils.gen_string_call_scm_get_sinh_vien_ws(i_str_dien_thoai, "", "", "", "10", "TOPICA");
                DataSet  v_ds           = v_ws_scm.TOS_search_info_hoc_vien(v_str_search);
                v_obj_sinhvien.get_sinh_vien_by_ds(v_ds);

                // Điền dữ liệu sinh viên vào form
                m_txt_ho_ten.Text      = v_obj_sinhvien.Ho_ten;
                m_txt_ma_hoc_vien.Text = v_obj_sinhvien.Ma_sinh_vien;
                m_txt_ma_lop.Text      = v_obj_sinhvien.Ma_lop;
                if (v_obj_sinhvien.Ngay_sinh != CIPConvert.ToDatetime("01/01/0001", "dd/MM/yyyy"))
                {
                    m_dtp_ngay_sinh.Value = CIPConvert.ToDatetime(v_obj_sinhvien.Ngay_sinh.ToShortDateString(), "dd/MM/yyyy");
                }
                if (v_obj_sinhvien.Truong != null)
                {
                    m_cbo_truong.SelectedValue = v_obj_sinhvien.Truong;
                }
                else
                {
                    m_cbo_truong.SelectedIndex = 0;
                }
                if (v_obj_sinhvien.Ho_Ten_QLHT != "" && v_obj_sinhvien.Ho_Ten_QLHT != null)
                {
                    m_txt_ho_ten_qlht.Text = v_obj_sinhvien.Ho_Ten_QLHT;
                }
                if (v_obj_sinhvien.Dien_thoai_QLHT != "" && v_obj_sinhvien.Dien_thoai_QLHT != null)
                {
                    m_txt_dien_thoai_qlht.Text = v_obj_sinhvien.Dien_thoai_QLHT;
                }

                // Load lịch sử cuộc gọi lên
                load_call_history_hoc_vien(i_str_dien_thoai);
                return(true);
            }
        }