public bool is_call_id_exist(string ip_str_call_id) { DS_GD_CUOC_GOI_YEU_CAU v_ds_gd_cuoc_goi_yc = new DS_GD_CUOC_GOI_YEU_CAU(); this.FillDataset(v_ds_gd_cuoc_goi_yc, " WHERE GD_CUOC_GOI_YEU_CAU.CALL_ID" + " = '" + ip_str_call_id + "'"); if (v_ds_gd_cuoc_goi_yc.GD_CUOC_GOI_YEU_CAU.Rows.Count > 0) { return(true); } return(false); }
public US_GD_CUOC_GOI_YEU_CAU(decimal i_dbID) { pm_objDS = new DS_GD_CUOC_GOI_YEU_CAU(); pm_strTableName = c_TableName; IMakeSelectCmd v_objMkCmd = new CMakeAndSelectCmd(pm_objDS, c_TableName); v_objMkCmd.AddCondition("ID", i_dbID, eKieuDuLieu.KieuNumber, eKieuSoSanh.Bang); SqlCommand v_cmdSQL; v_cmdSQL = v_objMkCmd.getSelectCmd(); this.FillDatasetByCommand(pm_objDS, v_cmdSQL); pm_objDR = getRowClone(pm_objDS.Tables[pm_strTableName].Rows[0]); }
public void fill_danh_sach_yeu_cau_hoc_vien(DS_GD_CUOC_GOI_YEU_CAU i_ds , string dien_thoai , string i_str_ho_ten , DateTime i_dt_tu_ngay , DateTime i_dt_den_ngay , decimal i_dc_id_trang_thai) { CStoredProc v_cstore = new CStoredProc("pr_GD_CUOC_GOI_YEU_CAU_fill_danh_sach_yeu_cau_hoc_vien"); v_cstore.addNVarcharInputParam("@DIEN_THOAI", dien_thoai); v_cstore.addNVarcharInputParam("@HO_TEN", i_str_ho_ten); v_cstore.addDatetimeInputParam("@TU_NGAY", i_dt_tu_ngay); v_cstore.addDatetimeInputParam("@DEN_NGAY", i_dt_den_ngay); v_cstore.addDecimalInputParam("@ID_TRANG_THAI", i_dc_id_trang_thai); v_cstore.fillDataSetByCommand(this, i_ds); }
public void load_ds_yeu_cau_hoc_vien_portal(DS_GD_CUOC_GOI_YEU_CAU i_ds , string dien_thoai , string i_str_ho_ten , DateTime i_dt_tu_ngay , DateTime i_dt_den_ngay , decimal i_dc_thoi_diem_goi , decimal i_dc_id_nguoi_dung) { CStoredProc v_cstore = new CStoredProc("pr_GD_CUOC_GOI_YEU_CAU_load_ds_yeu_cau_hoc_vien_portal"); v_cstore.addNVarcharInputParam("@DIEN_THOAI", dien_thoai); v_cstore.addNVarcharInputParam("@HO_TEN", i_str_ho_ten); v_cstore.addDatetimeInputParam("@TU_NGAY", i_dt_tu_ngay); v_cstore.addDatetimeInputParam("@DEN_NGAY", i_dt_den_ngay); v_cstore.addDecimalInputParam("@ID_NGUOI_DUNG", i_dc_id_nguoi_dung); v_cstore.addDecimalInputParam("@THOI_DIEM_GOI", i_dc_thoi_diem_goi); v_cstore.fillDataSetByCommand(this, i_ds); }
private void load_data_2_grid() { m_ds = new DS_GD_CUOC_GOI_YEU_CAU(); m_ds.EnforceConstraints = false; 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_us.load_ds_yeu_cau_hoc_vien_portal(m_ds , m_txt_dien_thoai.Text.Trim() , m_txt_ho_ten.Text.Trim() , v_dat_tu_ngay , v_dat_den_ngay , CIPConvert.ToDecimal(m_ddl_thoi_diem_goi.SelectedValue) , v_dc_id_nguoi_dung); m_grv_tong_hop_so_lieu.DataSource = m_ds; m_grv_tong_hop_so_lieu.DataBind(); }
private void load_data_2_grid() { m_ds = new DS_GD_CUOC_GOI_YEU_CAU(); m_ds.EnforceConstraints = false; 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_us.load_ds_yeu_cau_hoc_vien_portal(m_ds , m_txt_dien_thoai.Text.Trim() , m_txt_ho_ten.Text.Trim() , v_dat_tu_ngay , v_dat_den_ngay ,CIPConvert.ToDecimal(m_ddl_thoi_diem_goi.SelectedValue) , v_dc_id_nguoi_dung); m_grv_tong_hop_so_lieu.DataSource = m_ds; m_grv_tong_hop_so_lieu.DataBind(); }
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); } }
public US_GD_CUOC_GOI_YEU_CAU() { pm_objDS = new DS_GD_CUOC_GOI_YEU_CAU(); pm_strTableName = c_TableName; pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow(); }
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; } }
public void load_ds_yeu_cau_hoc_vien_portal(DS_GD_CUOC_GOI_YEU_CAU i_ds , string dien_thoai , string i_str_ho_ten , DateTime i_dt_tu_ngay , DateTime i_dt_den_ngay ,decimal i_dc_thoi_diem_goi , decimal i_dc_id_nguoi_dung) { CStoredProc v_cstore = new CStoredProc("pr_GD_CUOC_GOI_YEU_CAU_load_ds_yeu_cau_hoc_vien_portal"); v_cstore.addNVarcharInputParam("@DIEN_THOAI", dien_thoai); v_cstore.addNVarcharInputParam("@HO_TEN", i_str_ho_ten); v_cstore.addDatetimeInputParam("@TU_NGAY", i_dt_tu_ngay); v_cstore.addDatetimeInputParam("@DEN_NGAY", i_dt_den_ngay); v_cstore.addDecimalInputParam("@ID_NGUOI_DUNG", i_dc_id_nguoi_dung); v_cstore.addDecimalInputParam("@THOI_DIEM_GOI", i_dc_thoi_diem_goi); v_cstore.fillDataSetByCommand(this, i_ds); }
public bool is_call_id_exist(string ip_str_call_id) { DS_GD_CUOC_GOI_YEU_CAU v_ds_gd_cuoc_goi_yc = new DS_GD_CUOC_GOI_YEU_CAU(); this.FillDataset(v_ds_gd_cuoc_goi_yc, " WHERE " + GD_CUOC_GOI_YEU_CAU.CALL_ID + " = '" + ip_str_call_id + "'"); if (v_ds_gd_cuoc_goi_yc.GD_CUOC_GOI_YEU_CAU.Rows.Count > 0) return true; return false; }