private void insert_cau_hoi_moi() { m_us_cau_hoi = new US_GD_CAU_HOI_HOC_VIEN(); m_us_cau_hoi.strGHI_CHU_LICH_HEN = m_txt_ghi_chu_hen.Text; m_us_cau_hoi.strGHI_CHU_Y_KIEN_KHAC = m_txt_y_kien_khac.Text; m_us_cau_hoi.strNOI_DUNG_CAU_HOI = m_txt_cau_hoi.Text; m_us_cau_hoi.strNOI_DUNG_TRA_LOI = m_rtb_cau_tra_loi.Text; if (CValidateTextBox.IsValid(m_dat_ngay_hen_goi_lai, DataType.DateType, allowNull.YES) && m_dat_ngay_hen_goi_lai.Text.Trim() != "") { m_us_cau_hoi.datTHOI_DIEM_HEN_GOI_LAI = CIPConvert.ToDatetime(m_dat_ngay_hen_goi_lai.Value); } m_us_cau_hoi.dcID_CAU_HOI = m_us_v_cau_hoi.dcID; m_us_cau_hoi.dcID_DANH_GIA = CIPConvert.ToDecimal(m_cbo_danh_gia_tra_loi.SelectedValue); m_us_cau_hoi.dcID_LOAI_CAU_HOI = CIPConvert.ToDecimal(m_cbo_loai_cau_hoi_duoi.SelectedValue); m_us_cau_hoi.dcID_NGUOI_TRA_LOI = CAppContext_201.getCurrentUserID(); m_us_cau_hoi.dcID_TRANG_THAI = CIPConvert.ToDecimal(m_cbo_trang_thai_cau_hoi.SelectedValue); m_us_cau_hoi.dcID_YEU_CAU = m_us_cuoc_goi.dcID; // m_us_cau_hoi.Insert(); // if (CIPConvert.ToDecimal(m_cbo_trang_thai_cau_hoi.SelectedValue) == TU_DIEN_TRANG_THAI_GD_CAU_HOI_SV.CHO_TRA_LOI) { m_dc_id_trang_thai_cuoc_goi = TU_DIEN_TRANG_THAI_DON_HANG.DANG_CHO_GQ; } m_bl_luu_cau_hoi = true; BaseMessages.MsgBox_Infor("Đã lưu câu hỏi trên thành công. Nếu không còn câu hỏi nào nữa, hãy bấm \"End Call\""); }
private void load_data_2_grid() { try { string v_str_ngay_bat_dau_tu = "01/01/1900", v_str_ngay_ket_thuc_tu = "01/01/1900"; if (m_dat_ngay_bat_dau_tu.SelectedDate != CIPConvert.ToDatetime("01/01/0001", "dd/MM/yyyy")) { v_str_ngay_bat_dau_tu = CIPConvert.ToStr(m_dat_ngay_bat_dau_tu.SelectedDate, "dd/MM/yyyy"); } if (m_dat_ngay_ket_thuc_tu.SelectedDate != CIPConvert.ToDatetime("01/01/0001", "dd/MM/yyyy")) { v_str_ngay_ket_thuc_tu = CIPConvert.ToStr(m_dat_ngay_ket_thuc_tu.SelectedDate, "dd/MM/yyyy"); } m_us_dm_ho_so_giang_vien.fill_data_by_search(CIPConvert.ToDecimal(m_cbo_loc_giang_vien.SelectedValue) , CIPConvert.ToDecimal(m_cbo_loc_don_vi_thanh_toan.SelectedValue) , v_str_ngay_bat_dau_tu , v_str_ngay_ket_thuc_tu , CIPConvert.ToDecimal(m_cbo_loc_trang_thai.SelectedValue) , m_ds_dm_ho_so_giang_vien ); m_grv_dm_ho_so.DataSource = m_ds_dm_ho_so_giang_vien.DM_HO_SO_GIANG_VIEN; m_grv_dm_ho_so.DataBind(); m_lbl_thong_bao.Text = "Kết quả lọc dữ liệu: " + m_ds_dm_ho_so_giang_vien.DM_HO_SO_GIANG_VIEN.Rows.Count + " bản ghi"; m_lbl_thong_bao.Visible = true; } catch (Exception v_e) { throw v_e; } }
private void form_2_us_object() { System.Globalization.CultureInfo enUS = new System.Globalization.CultureInfo("en-US"); DateTime v_dat_out_result; m_us_cong_viec_moi.dcID_HOP_DONG_KHUNG = CIPConvert.ToDecimal(m_cbo_so_hop_dong.SelectedValue); m_us_cong_viec_moi.dcID_NOI_DUNG_TT = CIPConvert.ToDecimal(m_cbo_noi_dung_thanh_toan.SelectedValue); if (m_txt_so_luong.Text != "") { m_us_cong_viec_moi.dcSO_LUONG_HE_SO = CIPConvert.ToDecimal(m_txt_so_luong.Text); } if (m_txt_don_gia.Text != "") { m_us_cong_viec_moi.dcDON_GIA = CIPConvert.ToDecimal(m_txt_don_gia.Text); } if (DateTime.TryParseExact(CIPConvert.ToStr(m_dat_ngay_bat_dau.SelectedDate), "dd/MM/yyyy", enUS, System.Globalization.DateTimeStyles.None, out v_dat_out_result)) { if (m_dat_ngay_bat_dau.SelectedDate != CIPConvert.ToDatetime("01/01/0001")) { m_us_cong_viec_moi.datNGAY_DAT_HANG = m_dat_ngay_bat_dau.SelectedDate; } else { m_us_cong_viec_moi.datNGAY_DAT_HANG = CIPConvert.ToDatetime("01/01/1900"); } } m_us_cong_viec_moi.SetNGAY_NGHIEM_THUNull(); m_us_cong_viec_moi.SetSO_LUONG_NGHIEM_THUNull(); m_us_cong_viec_moi.dcID_TRANG_THAI = CIPConvert.ToDecimal(m_cbo_trang_thai_cv_gv.SelectedValue); m_us_cong_viec_moi.strGHI_CHU = m_txt_ghi_chu.Text; m_us_cong_viec_moi.dcID_USER_NHAP = get_id_user_by_username(CIPConvert.ToStr(Session["Username"])); }
public void fill_data_by_search(decimal i_dc_id_mon_hoc , string i_str_online_yn , string i_str_offline_yn , string i_str_bt_gky_yn , string i_str_key_word , string i_str_bat_dau_tu , string i_str_bat_dau_den , string i_str_ket_thuc_tu , string i_str_ket_thuc_den , string i_str_thi_tu , string i_str_thi_den , DS_GD_LOP_MON i_ds) { try { CStoredProc v_object = new CStoredProc("pr_GD_LOP_MON_Fill_By_Search"); v_object.addDecimalInputParam("@ip_id_mon_hoc", i_dc_id_mon_hoc); v_object.addNVarcharInputParam("@ip_online_yn", i_str_online_yn); v_object.addNVarcharInputParam("@ip_offline_yn", i_str_offline_yn); v_object.addNVarcharInputParam("@ip_bt_gky_yn", i_str_bt_gky_yn); v_object.addNVarcharInputParam("@ip_key_word", i_str_key_word); v_object.addDatetimeInputParam("@ip_ngay_bat_dau_tu", CIPConvert.ToDatetime(i_str_bat_dau_tu, "dd/MM/yyyy")); v_object.addDatetimeInputParam("@ip_ngay_bat_dau_den", CIPConvert.ToDatetime(i_str_bat_dau_den, "dd/MM/yyyy")); v_object.addDatetimeInputParam("@ip_ngay_ket_thuc_tu", CIPConvert.ToDatetime(i_str_ket_thuc_tu, "dd/MM/yyyy")); v_object.addDatetimeInputParam("@ip_ngay_ket_thuc_den", CIPConvert.ToDatetime(i_str_ket_thuc_den, "dd/MM/yyyy")); v_object.addDatetimeInputParam("@ip_ngay_thi_tu", CIPConvert.ToDatetime(i_str_thi_tu, "dd/MM/yyyy")); v_object.addDatetimeInputParam("@ip_ngay_thi_den", CIPConvert.ToDatetime(i_str_thi_den, "dd/MM/yyyy")); v_object.fillDataSetByCommand(this, i_ds); } catch (Exception v_e) { throw v_e; } }
private void session_2_form() { m_txt_ten_giang_vien.Text = CIPConvert.ToStr(Session["Snamekhung"]); m_txt_so_hd.Text = CIPConvert.ToStr(Session["Ssohdkhung"]); m_txt_tu_khoa_tim_kiem.Text = CIPConvert.ToStr(Session["Skeykhung"]); m_txt_ma_PO_quan_ly.Text = CIPConvert.ToStr(Session["Spokhung"]); m_cbo_loai_hop_dong_search.SelectedValue = CIPConvert.ToStr(CIPConvert.ToDecimal(Session["Sloaihdkhung"])); m_cbo_don_vi_quan_ly_search.SelectedValue = CIPConvert.ToStr(CIPConvert.ToDecimal(Session["Squanlykhung"])); m_cbo_thang_ky.SelectedValue = CIPConvert.ToStr(Session["Sthangkykhung"]); m_cbo_nam_ky.SelectedValue = CIPConvert.ToStr(Session["Snamkykhung"]); if (CIPConvert.ToStr(Session["Sthangkykhung"]) != "") { m_cbo_thang_ky.SelectedValue = CIPConvert.ToStr(Session["Sthangkykhung"]); } if (CIPConvert.ToStr(Session["Sdathieuluckhung"]) != "" && CIPConvert.ToDatetime(CIPConvert.ToStr(Session["Sdathieuluckhung"]), "dd/MM/yyyy") != CIPConvert.ToDatetime("01/01/1900", "dd/MM/yyyy")) { m_dat_ngay_hieu_luc.SelectedDate = CIPConvert.ToDatetime(CIPConvert.ToStr(Session["Sdathieuluckhung"]), "dd/MM/yyyy"); } if (CIPConvert.ToStr(Session["Sdatketthuc"]) != "" && CIPConvert.ToDatetime(CIPConvert.ToStr(Session["Sdatketthuc"]), "dd/MM/yyyy") != CIPConvert.ToDatetime("01/01/1900", "dd/MM/yyyy")) { m_dat_date_ket_thuc.SelectedDate = CIPConvert.ToDatetime(CIPConvert.ToStr(Session["Sdatketthuc"]), "dd/MM/yyyy"); } m_cbo_trang_thai_hop_dong_search.SelectedValue = CIPConvert.ToStr(CIPConvert.ToDecimal(Session["Strangthaihdkhung"])); }
private void form_2_us_obj(US_V_GD_THANH_TOAN op_us_gd_thanh_toan) { op_us_gd_thanh_toan.strSO_PHIEU_THANH_TOAN = get_ma_dot_tt_by_id_dot(CIPConvert.ToDecimal(m_cbo_dot_thanh_toan.SelectedValue)); op_us_gd_thanh_toan.dcID_HOP_DONG_KHUNG = get_id_hd_khung_by_so_hd(m_txt_so_hop_dong.Text.Trim()); op_us_gd_thanh_toan.strREFERENCE_CODE = m_txt_ma_lop_mon.Text.Trim(); if (m_dat_ngay_thanh_toan.SelectedDate == CIPConvert.ToDatetime("01/01/0001", "dd/MM/yyyy")) { string sScript; sScript = "<script language='javascript'>alert('Bạn phải nhập ngày thanh toán');</script>"; Page.ClientScript.RegisterStartupScript(this.GetType(), "onload", sScript); m_dat_ngay_thanh_toan.Focus(); return; } else { op_us_gd_thanh_toan.datNGAY_THANH_TOAN = m_dat_ngay_thanh_toan.SelectedDate; } op_us_gd_thanh_toan.dcTONG_TIEN_THANH_TOAN = CIPConvert.ToDecimal(m_txt_so_tien_thanh_toan.Text); op_us_gd_thanh_toan.SetGIA_TRI_NGHIEM_THU_THUC_TENull(); op_us_gd_thanh_toan.dcTONG_TIEN_THUC_NHAN = CIPConvert.ToDecimal(m_txt_so_tien_thuc_nhan.Text); op_us_gd_thanh_toan.dcSO_TIEN_THUE = CIPConvert.ToDecimal(m_txt_so_tien_thue1.Text); op_us_gd_thanh_toan.dcID_TRANG_THAI_THANH_TOAN = CIPConvert.ToDecimal(m_cbo_trang_thai_thanh_toan.SelectedValue); op_us_gd_thanh_toan.strDESCRIPTION = m_txt_mo_ta.Text.Trim(); if (Session["UserName"].GetType() != typeof(DBNull)) { op_us_gd_thanh_toan.strPO_LAP_THANH_TOAN = CIPConvert.ToStr(Session["UserName"]); } op_us_gd_thanh_toan.strGHI_CHU_CAC_MON_PHU_TRACH = m_txt_ten_cac_mon_phu_trach.Text.Trim(); op_us_gd_thanh_toan.strGHI_CHU_THOI_GIAN_LOP_MON = m_txt_thoi_gian_lop_mon.Text.Trim(); op_us_gd_thanh_toan.strGHI_CHU_HE_SO_DON_GIA = m_txt_he_so_quy_mo.Text; op_us_gd_thanh_toan.strGHI_CHU_4 = m_txt_ghi_chu_4.Text; op_us_gd_thanh_toan.strGHI_CHU_5 = m_txt_ghi_chu_5.Text; }
private void load_data_2_cbo_dot_thanh_toan(decimal ip_dc_thang_tt, decimal ip_dc_nam_tt, decimal ip_dc_id_don_vi_tt) { DS_V_DM_DOT_THANH_TOAN v_ds_dot_thanh_toan = new DS_V_DM_DOT_THANH_TOAN(); US_V_DM_DOT_THANH_TOAN v_us_dot_thanh_toan = new US_V_DM_DOT_THANH_TOAN(); // Load đợt thanh toán dựa vào tháng và năm thanh toán v_us_dot_thanh_toan.load_data_2_dot_tt_by_thang_nam(ip_dc_thang_tt, ip_dc_nam_tt, ip_dc_id_don_vi_tt, v_ds_dot_thanh_toan); DataRow v_dr = v_ds_dot_thanh_toan.V_DM_DOT_THANH_TOAN.NewV_DM_DOT_THANH_TOANRow(); v_dr[V_DM_DOT_THANH_TOAN.ID] = 0; v_dr[V_DM_DOT_THANH_TOAN.MA_DOT_TT] = "All"; v_dr[V_DM_DOT_THANH_TOAN.TEN_DOT_TT] = "Tất cả"; v_dr[V_DM_DOT_THANH_TOAN.NGAY_TT_DU_KIEN] = CIPConvert.ToDatetime("01/01/2010"); v_dr[V_DM_DOT_THANH_TOAN.ID_DON_VI_THANH_TOAN] = 0; v_dr[V_DM_DOT_THANH_TOAN.TRANG_THAI_DOT_TT] = 0; v_dr[V_DM_DOT_THANH_TOAN.ID_TRANG_THAI_DOT_TT] = 0; v_dr[V_DM_DOT_THANH_TOAN.DON_VI_THANH_TOAN] = "All"; v_ds_dot_thanh_toan.V_DM_DOT_THANH_TOAN.Rows.InsertAt(v_dr, 0); m_cbo_dot_thanh_toan.DataTextField = V_DM_DOT_THANH_TOAN.TEN_DOT_TT; m_cbo_dot_thanh_toan.DataValueField = V_DM_DOT_THANH_TOAN.ID; m_cbo_dot_thanh_toan.DataSource = v_ds_dot_thanh_toan.V_DM_DOT_THANH_TOAN; m_cbo_dot_thanh_toan.DataBind(); //ListItem v_items = new ListItem(get_id_kho()); //m_cbo_dot_thanh_toan.Items.Remove(v_items); }
private void us_object_2_form() { m_txt_ma_lop_mon.Text = m_us_gd_lop_mon.strMA_LOP_MON; m_cbo_dm_mon_hoc.SelectedValue = CIPConvert.ToStr(m_us_gd_lop_mon.dcID_MON_HOC); m_txt_po_phu_trach.Text = m_us_gd_lop_mon.strPO_PHU_TRACH; m_txt_chuong_trinh_phu_trach.Text = m_us_gd_lop_mon.strCHUONG_TRINH_PHU_TRACH; m_txt_slhv.Text = CIPConvert.ToStr(m_us_gd_lop_mon.dcSO_LUONG_HV, "#,###0"); m_txt_slhv_online.Text = CIPConvert.ToStr(m_us_gd_lop_mon.dcSO_LUONG_ONLINES, "#,###0"); m_txt_slhv_offline.Text = CIPConvert.ToStr(m_us_gd_lop_mon.dcSO_LUONG_OFFLINE, "#,###0"); m_rbt_online_yn.SelectedValue = m_us_gd_lop_mon.strONLINES_YN; m_rbt_offline_yn.SelectedValue = m_us_gd_lop_mon.strOFFLINE_YN; m_rbt_bt_gky_yn.SelectedValue = m_us_gd_lop_mon.strBAI_TAP_GKY_YN; if (!m_us_gd_lop_mon.IsNGAY_THINull()) { m_dat_ngay_thi.SelectedDate = CIPConvert.ToDatetime(CIPConvert.ToStr(m_us_gd_lop_mon.datNGAY_THI, "dd/MM/yyyy"), "dd/MM/yyyy"); } if (!m_us_gd_lop_mon.IsNGAY_BAT_DAUNull()) { m_dat_ngay_bat_dau.SelectedDate = CIPConvert.ToDatetime(CIPConvert.ToStr(m_us_gd_lop_mon.datNGAY_BAT_DAU, "dd/MM/yyyy"), "dd/MM/yyyy"); } if (!m_us_gd_lop_mon.IsNGAY_KET_THUCNull()) { m_dat_ngay_ket_thuc.SelectedDate = CIPConvert.ToDatetime(CIPConvert.ToStr(m_us_gd_lop_mon.datNGAY_KET_THUC, "dd/MM/yyyy"), "dd/MM/yyyy"); } }
private void load_data_2_grid() { 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"); } US_V_GD_CAU_HOI_YEU_CAU v_us = new US_V_GD_CAU_HOI_YEU_CAU(); DataSet v_ds = new DataSet(); v_ds = v_us.tong_hop_so_luong_cau_hoi_theo_ngay(v_dat_tu_ngay, v_dat_den_ngay); m_grv_tong_hop_so_lieu.DataSource = v_ds.Tables[0]; m_grv_tong_hop_so_lieu.DataBind(); }
private void form_2_us_obj(US_V_DM_DOT_THANH_TOAN op_us_v_dm_dot_thanh_toan) { System.Globalization.CultureInfo enUS = new System.Globalization.CultureInfo("en-US"); op_us_v_dm_dot_thanh_toan.dcID_DON_VI_THANH_TOAN = CIPConvert.ToDecimal(m_cbo_dm_loai_don_vi_thanh_toan.SelectedValue); op_us_v_dm_dot_thanh_toan.strMA_DOT_TT = m_txt_ma_dot_tt.Text; op_us_v_dm_dot_thanh_toan.strTEN_DOT_TT = m_txt_ten_dot_tt.Text; // Đây là tình trạng không nhập ngày if (m_dat_ngay_ket_thuc_du_kien.SelectedDate == CIPConvert.ToDatetime("01/01/0001", "dd/MM/yyyy")) { string someScript; someScript = "<script language='javascript'>alert('Bạn phải nhập ngày kết thúc dự kiến ');</script>"; Page.ClientScript.RegisterStartupScript(this.GetType(), "onload", someScript); m_dat_ngay_ket_thuc_du_kien.Focus(); return; } else { op_us_v_dm_dot_thanh_toan.datNGAY_TT_DU_KIEN = m_dat_ngay_ket_thuc_du_kien.SelectedDate; } if (m_dat_ngay_thu_chung_tu.SelectedDate == CIPConvert.ToDatetime("01/01/0001", "dd/MM/yyyy")) { string someScript; someScript = "<script language='javascript'>alert('Bạn phải nhập ngày thu chứng từ');</script>"; Page.ClientScript.RegisterStartupScript(this.GetType(), "onload", someScript); m_dat_ngay_thu_chung_tu.Focus(); return; } else { op_us_v_dm_dot_thanh_toan.datNGAY_THU_CHUNG_TU = m_dat_ngay_thu_chung_tu.SelectedDate; } op_us_v_dm_dot_thanh_toan.dcID_TRANG_THAI_DOT_TT = CIPConvert.ToDecimal(m_cbo_dm_trang_thai_dot_thanh_toan.SelectedValue); op_us_v_dm_dot_thanh_toan.strGHI_CHU = m_txt_ghi_chu.Text; }
private void loadTieuDe(ref string strTable) { strTable += "<table cellpadding='2' cellspacing='0' class='cssTableReport'>"; strTable += "\n<tr>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'> </td>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'> </td>"; strTable += "\n<td><align='center' class='cssTableView' style='width: 100%; height: 40px; font-size: large; color:White; background-color:#810C15;' nowrap='wrap'>TRM106 - BÁO CÁO HỒ SƠ GIẢNG VIÊN " + "</td>"; strTable += "\n</tr>"; // // strTable += "\n<tr>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'> </td>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'> </td>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'>Giảng viên: " + m_cbo_loc_giang_vien.SelectedItem.Text + "</td>"; strTable += "\n</tr>"; // strTable += "\n<tr>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'> </td>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'> </td>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'>Đơn vị thanh toán: " + m_cbo_loc_don_vi_thanh_toan.SelectedItem.Text + "</td>"; strTable += "\n</tr>"; strTable += "\n<tr>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'> </td>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'> </td>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'> Ngày cập nhật - Từ ngày: "; if (m_dat_ngay_bat_dau_tu.SelectedDate != CIPConvert.ToDatetime("01/01/0001", "dd/MM/yyyy")) { strTable += CIPConvert.ToStr(m_dat_ngay_bat_dau_tu.SelectedDate); } ; strTable += " Đến ngày:"; if (m_dat_ngay_ket_thuc_tu.SelectedDate != CIPConvert.ToDatetime("01/01/0001", "dd/MM/yyyy")) { strTable += CIPConvert.ToStr(m_dat_ngay_ket_thuc_tu.SelectedDate); } ; strTable += "</td>"; strTable += "\n</tr>"; // strTable += "\n<tr>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'> </td>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'> </td>"; strTable += "\n<td><align='center' class='cssTableView' style='width:100%;' nowrap='nowrap'>Trạng thái: " + m_cbo_loc_trang_thai.SelectedItem.Text + " </td>"; strTable += "\n</tr>"; strTable += "\n</table>"; //table noi dung strTable += "<table cellpadding='2' cellspacing='0' class='cssTableReport'>"; strTable += "\n<tr>"; strTable += "\n<td style='width:12%;' class='cssTableView' nowrap='nowrap'>STT</td>"; strTable += "\n<td style='width:12%;' class='cssTableView' nowrap='nowrap'>Giảng viên</td>"; strTable += "\n<td style='width:12%;' class='cssTableView' nowrap='nowrap'>Đơn vị thanh toán</td>"; strTable += "\n<td style='width:12%;' class='cssTableView' nowrap='nowrap'>Ngày cập nhật</td>"; strTable += "\n<td style='width:12%;' class='cssTableView' nowrap='nowrap'>Trạng thái</td>"; strTable += "\n<td style='width:12%;' class='cssTableView' nowrap='nowrap'>Ghi chú</td>"; strTable += "\n</tr>"; //loadGridExprort(ref strTable); loadDSExprort(ref strTable); strTable += "\n</table>"; }
private void form_2_us_obj(US_V_GD_THANH_TOAN op_us_gd_thanh_toan) { op_us_gd_thanh_toan.strSO_PHIEU_THANH_TOAN = get_ma_dot_tt_by_id_dot(CIPConvert.ToDecimal(m_cbo_dot_thanh_toan.SelectedValue)); op_us_gd_thanh_toan.dcID_HOP_DONG_KHUNG = get_id_hd_khung_by_so_hd(m_txt_so_hop_dong.Text.Trim()); if (m_dat_ngay_thanh_toan.SelectedDate == CIPConvert.ToDatetime("01/01/0001", "dd/MM/yyyy")) { string sScript; sScript = "<script language='javascript'>alert('Bạn phải nhập ngày thanh toán');</script>"; Page.ClientScript.RegisterStartupScript(this.GetType(), "onload", sScript); m_dat_ngay_thanh_toan.Focus(); return; } else { op_us_gd_thanh_toan.datNGAY_THANH_TOAN = m_dat_ngay_thanh_toan.SelectedDate; } op_us_gd_thanh_toan.dcTONG_TIEN_THANH_TOAN = CIPConvert.ToDecimal(m_txt_so_tien_thanh_toan.Text); if (m_txt_so_tien_thuc_nhan.Text == "") { op_us_gd_thanh_toan.dcTONG_TIEN_THUC_NHAN = 0; } else { op_us_gd_thanh_toan.dcTONG_TIEN_THUC_NHAN = CIPConvert.ToDecimal(m_txt_so_tien_thuc_nhan.Text); } if (m_txt_so_tien_thue1.Text == "") { op_us_gd_thanh_toan.dcSO_TIEN_THUE = 0; } else { op_us_gd_thanh_toan.dcSO_TIEN_THUE = CIPConvert.ToDecimal(m_txt_so_tien_thue1.Text); } op_us_gd_thanh_toan.dcID_TRANG_THAI_THANH_TOAN = CIPConvert.ToDecimal(m_cbo_trang_thai_thanh_toan.SelectedValue); op_us_gd_thanh_toan.strDESCRIPTION = m_txt_mo_ta.Text.Trim(); if (Session["UserName"].GetType() != typeof(DBNull)) { op_us_gd_thanh_toan.strPO_LAP_THANH_TOAN = CIPConvert.ToStr(Session["UserName"]); } if (rdl_noi_dung_list.Items[1].Selected == true) { op_us_gd_thanh_toan.SetGIA_TRI_NGHIEM_THU_THUC_TENull(); } else { op_us_gd_thanh_toan.dcGIA_TRI_NGHIEM_THU_THUC_TE = CIPConvert.ToDecimal(m_txt_gia_tri_nghiem_thu_thuc_te.Text.Trim()); } if (rdl_noi_dung_list.Items[1].Selected) { op_us_gd_thanh_toan.strREFERENCE_CODE = "đợt " + m_cbo_lan_so.SelectedValue; } else { op_us_gd_thanh_toan.SetREFERENCE_CODENull(); } }
private void form_2_us_object() { m_us_gd_lop_mon.dcID = CIPConvert.ToDecimal(this.Request.QueryString["id_lop_mon"].ToString()); m_us_gd_lop_mon.strMA_LOP_MON = m_txt_ma_lop_mon.Text; m_us_gd_lop_mon.dcID_MON_HOC = CIPConvert.ToDecimal(m_cbo_dm_mon_hoc.SelectedValue); if (m_txt_slhv.Text != "") { m_us_gd_lop_mon.dcSO_LUONG_HV = CIPConvert.ToDecimal(m_txt_slhv.Text); } if (m_txt_slhv_online.Text != "") { m_us_gd_lop_mon.dcSO_LUONG_ONLINES = CIPConvert.ToDecimal(m_txt_slhv_online.Text); } if (m_txt_slhv_offline.Text != "") { m_us_gd_lop_mon.dcSO_LUONG_OFFLINE = CIPConvert.ToDecimal(m_txt_slhv_offline.Text); } m_us_gd_lop_mon.strPO_PHU_TRACH = m_txt_po_phu_trach.Text; m_us_gd_lop_mon.strCHUONG_TRINH_PHU_TRACH = m_txt_chuong_trinh_phu_trach.Text; if (m_dat_ngay_bat_dau.SelectedDate != CIPConvert.ToDatetime("01/01/0001")) { m_us_gd_lop_mon.datNGAY_BAT_DAU = m_dat_ngay_bat_dau.SelectedDate; } if (m_dat_ngay_ket_thuc.SelectedDate != CIPConvert.ToDatetime("01/01/0001")) { m_us_gd_lop_mon.datNGAY_KET_THUC = m_dat_ngay_ket_thuc.SelectedDate; } if (m_dat_ngay_thi.SelectedDate != CIPConvert.ToDatetime("01/01/0001")) { m_us_gd_lop_mon.datNGAY_THI = m_dat_ngay_thi.SelectedDate; } if (m_rbt_online_yn.SelectedValue == "Y") { m_us_gd_lop_mon.strONLINES_YN = "Y"; } else { m_us_gd_lop_mon.strONLINES_YN = "N"; } if (m_rbt_offline_yn.SelectedValue == "Y") { m_us_gd_lop_mon.strOFFLINE_YN = "Y"; } else { m_us_gd_lop_mon.strOFFLINE_YN = "N"; } if (m_rbt_bt_gky_yn.SelectedValue == "Y") { m_us_gd_lop_mon.strBAI_TAP_GKY_YN = "Y"; } else { m_us_gd_lop_mon.strBAI_TAP_GKY_YN = "N"; } }
private void grid2us_object(US_V_DM_CAU_HOI i_us , int i_grid_row) { m_us_cau_hoi_yeu_cau.datNGAY_SINH = CIPConvert.ToDatetime(CIPConvert.ToStr(m_fg[i_grid_row, (int)e_col_Number.NGAY_SINH]), "dd/MM/yyyy"); m_us_cau_hoi_yeu_cau.strHO_TEN_SINH_VIEN = CIPConvert.ToStr(m_fg[i_grid_row, (int)e_col_Number.HO_TEN]); m_us_cau_hoi_yeu_cau.strLOP = CIPConvert.ToStr(m_fg[i_grid_row, (int)e_col_Number.MA_LOP]); m_us_cau_hoi_yeu_cau.strMA_SINH_VIEN = CIPConvert.ToStr(m_fg[i_grid_row, (int)e_col_Number.MA_SINH_VIEN]); m_us_cau_hoi_yeu_cau.strNOI_SINH = CIPConvert.ToStr(m_fg[i_grid_row, (int)e_col_Number.NOI_SINH]); m_us_cau_hoi_yeu_cau.strTRUONG = CIPConvert.ToStr(m_fg[i_grid_row, (int)e_col_Number.MA_TRUONG]); }
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>"; }
private void load_data_2_control_cong_viec() { if (m_cbo_noi_dung_thanh_toan.Items.Count > 0 && !m_cbo_noi_dung_thanh_toan.SelectedValue.Equals("0")) { // Lấy công việc theo số HĐ và ID công việc m_us_cong_viec_moi.lay_cong_viec_de_nghiem_thu(m_ds_cong_viec_moi, CIPConvert.ToDecimal(m_cbo_so_hop_dong.SelectedValue), CIPConvert.ToDecimal(m_cbo_noi_dung_thanh_toan.SelectedValue)); // Nếu đã tồn tại công việc đó rồi thì load theo đơn giá như công việc đã nhập if (m_ds_cong_viec_moi.V_GD_GV_CONG_VIEC_MOI.Rows.Count > 0) { if (m_ds_cong_viec_moi.V_GD_GV_CONG_VIEC_MOI.Rows[0][V_GD_GV_CONG_VIEC_MOI.NGAY_DAT_HANG].GetType() != typeof(DBNull)) { m_dat_ngay_bat_dau.SelectedDate = CIPConvert.ToDatetime(CIPConvert.ToStr(m_ds_cong_viec_moi.V_GD_GV_CONG_VIEC_MOI.Rows[0][V_GD_GV_CONG_VIEC_MOI.NGAY_DAT_HANG]), "dd/MM/yyyy"); } if (m_ds_cong_viec_moi.V_GD_GV_CONG_VIEC_MOI.Rows[0][V_GD_GV_CONG_VIEC_MOI.SO_LUONG_HE_SO].GetType() != typeof(DBNull)) { m_txt_so_luong.Text = CIPConvert.ToStr(m_ds_cong_viec_moi.V_GD_GV_CONG_VIEC_MOI.Rows[0][V_GD_GV_CONG_VIEC_MOI.SO_LUONG_HE_SO], "#"); } m_txt_so_luong.Enabled = false; //m_cbo_trang_thai_cv_gv.SelectedValue = CIPConvert.ToStr(m_ds_cong_viec_moi.V_GD_GV_CONG_VIEC_MOI.Rows[0][V_GD_GV_CONG_VIEC_MOI.ID_TRANG_THAI]); if (m_ds_cong_viec_moi.V_GD_GV_CONG_VIEC_MOI.Rows[0][V_GD_GV_CONG_VIEC_MOI.SO_LUONG_NGHIEM_THU].GetType() != typeof(DBNull)) { m_txt_so_luong_nghiem_thu.Text = CIPConvert.ToStr(m_ds_cong_viec_moi.V_GD_GV_CONG_VIEC_MOI.Rows[0][V_GD_GV_CONG_VIEC_MOI.SO_LUONG_NGHIEM_THU], "#"); } m_cbo_trang_thai_cv_gv.ToolTip = CIPConvert.ToStr(m_ds_cong_viec_moi.V_GD_GV_CONG_VIEC_MOI.Rows[0][V_GD_GV_CONG_VIEC_MOI.ID_TRANG_THAI]); m_cbo_so_hop_dong.ToolTip = CIPConvert.ToStr(m_ds_cong_viec_moi.V_GD_GV_CONG_VIEC_MOI.Rows[0][V_GD_GV_CONG_VIEC_MOI.ID]); m_txt_don_gia.Text = CIPConvert.ToStr(m_ds_cong_viec_moi.V_GD_GV_CONG_VIEC_MOI.Rows[0][V_GD_GV_CONG_VIEC_MOI.DON_GIA], "#,###"); } // Còn nếu công việc này ko có trong kế hoạch else { decimal v_dc_id_noi_dung_tt = CIPConvert.ToDecimal(m_cbo_noi_dung_thanh_toan.SelectedValue); DateTime v_dat_today = DateTime.Today; int v_i_year = v_dat_today.Year; int v_i_month = v_dat_today.Month - 1; if (v_i_month == 0) { v_i_year = v_i_year - 1; v_i_month = 12; } DateTime v_dat_ngay_dat_hang = new DateTime(v_i_year, v_i_month, 1); US_V_GD_HOP_DONG_NOI_DUNG_TT v_us_dm_noi_dung_tt = new US_V_GD_HOP_DONG_NOI_DUNG_TT(v_dc_id_noi_dung_tt); m_txt_don_gia.Text = CIPConvert.ToStr(v_us_dm_noi_dung_tt.dcDON_GIA_HD, "#,###"); m_lbl_mess.Text = ""; m_cbo_trang_thai_cv_gv.ToolTip = "-1"; m_cbo_so_hop_dong.ToolTip = "-1"; m_dat_ngay_bat_dau.SelectedDate = v_dat_ngay_dat_hang; m_txt_so_luong_nghiem_thu.Text = ""; } } }
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>"; }
private void load_data_2_grid() { //Lay ngay dau nam string v_str_dau_nam = "01/01/" + m_dat_nam.Value.Year; DateTime v_dat = CIPConvert.ToDatetime(v_str_dau_nam); m_ds = new DS_RPT_LUONG_THEO_QD(); m_us.FillDatasetByProc(m_ds, v_dat, CAppContext_201.getCurrentIDPhapnhan()); m_fg.Redraw = false; CGridUtils.Dataset2C1Grid(m_ds, m_fg, m_obj_trans); m_fg.Redraw = true; wrap_text_all_cells(); CGridUtils.MakeSoTT(0, m_fg); }
private void us_obj_2_form(US_V_DM_DOT_THANH_TOAN ip_us_v_dm_dot_thanh_toan) { m_cbo_dm_loai_don_vi_thanh_toan.SelectedValue = CIPConvert.ToStr(ip_us_v_dm_dot_thanh_toan.dcID_DON_VI_THANH_TOAN); m_txt_ma_dot_tt.Text = ip_us_v_dm_dot_thanh_toan.strMA_DOT_TT; m_txt_ten_dot_tt.Text = ip_us_v_dm_dot_thanh_toan.strTEN_DOT_TT; if (ip_us_v_dm_dot_thanh_toan.datNGAY_TT_DU_KIEN != CIPConvert.ToDatetime("01/01/1900", "dd/MM/yyyy")) { m_dat_ngay_ket_thuc_du_kien.SelectedDate = ip_us_v_dm_dot_thanh_toan.datNGAY_TT_DU_KIEN; } if (ip_us_v_dm_dot_thanh_toan.datNGAY_THU_CHUNG_TU != CIPConvert.ToDatetime("01/01/1900", "dd/MM/yyyy")) { m_dat_ngay_thu_chung_tu.SelectedDate = ip_us_v_dm_dot_thanh_toan.datNGAY_THU_CHUNG_TU; } m_cbo_dm_trang_thai_dot_thanh_toan.SelectedValue = CIPConvert.ToStr(ip_us_v_dm_dot_thanh_toan.dcID_TRANG_THAI_DOT_TT); m_txt_ghi_chu.Text = ip_us_v_dm_dot_thanh_toan.strGHI_CHU; }
public void fill_data_by_search(decimal i_dc_id_giang_vien, decimal i_dc_id_don_vi_tt, string i_str_bat_dau_tu, string i_str_ket_thuc_tu, decimal i_dc_id_trang_thai, DS_DM_HO_SO_GIANG_VIEN i_ds) { CStoredProc v_object = new CStoredProc("pr_DM_HO_SO_GIANG_VIEN_Fill_By_Search"); v_object.addDecimalInputParam("@ip_id_giang_vien", i_dc_id_giang_vien); v_object.addDecimalInputParam("@ip_id_don_vi_tt", i_dc_id_don_vi_tt); v_object.addDecimalInputParam("@ip_id_trang_thai", i_dc_id_trang_thai); v_object.addDatetimeInputParam("@ip_ngay_bat_dau_tu", CIPConvert.ToDatetime(i_str_bat_dau_tu, "dd/MM/yyyy")); v_object.addDatetimeInputParam("@ip_ngay_ket_thuc_tu", CIPConvert.ToDatetime(i_str_ket_thuc_tu, "dd/MM/yyyy")); v_object.fillDataSetByCommand(this, i_ds); }
private void grid2us_object(US_HT_NHOM_NGUOI_SU_DUNG i_us , int i_grid_row) { DataRow v_dr; v_dr = (DataRow)m_fg.Rows[i_grid_row].UserData; m_obj_trans.GridRow2DataRow(i_grid_row, v_dr); i_us.dcID = CIPConvert.ToDecimal(v_dr[0]); i_us.strMA_NHOM = CIPConvert.ToStr(v_dr[1]); i_us.strTRANG_THAI_NHOM = CIPConvert.ToStr(v_dr[3]); i_us.dcID_INPUTED_BY = CIPConvert.ToDecimal(v_dr[4]); i_us.dcID_LAST_UPDATED_BY = CIPConvert.ToDecimal(v_dr[6]); i_us.strGHI_CHU = CIPConvert.ToStr(v_dr[2]); i_us.datINPUTED_DATE = CIPConvert.ToDatetime(CIPConvert.ToStr(v_dr[5])); i_us.datLAS_UPDATED_DATE = CIPConvert.ToDatetime(CIPConvert.ToStr(v_dr[7])); }
private void insert_cuoc_goi_moi() { CallInfor v_call_info = new CallInfor(); v_call_info = HelpUtils.get_call_infor(m_us_cuoc_goi.strCALL_ID ); m_us_cuoc_goi.strERROR_CODE = v_call_info.error_code; m_us_cuoc_goi.strERROR_DESC = v_call_info.error_desc; m_us_cuoc_goi.strSTATUS = v_call_info.status; m_us_cuoc_goi.strVOICE_CALL_LINK = v_call_info.link_down_record; if (v_call_info.datetime_response != null) { m_us_cuoc_goi.datDATETIME_RESPOND = HelpUtils.string_2_datetime(v_call_info.datetime_response); } else { m_us_cuoc_goi.datDATETIME_RESPOND = CIPConvert.ToDatetime("01/01/1900", "dd/MM/yyyy"); } if (v_call_info.end_time != null) { m_us_cuoc_goi.datEND_TIME = HelpUtils.string_2_datetime(v_call_info.end_time); } else { m_us_cuoc_goi.datEND_TIME = CIPConvert.ToDatetime("01/01/1900", "dd/MM/yyyy"); } if (v_call_info.start_time != null) { m_us_cuoc_goi.datSTART_TIME = HelpUtils.string_2_datetime(v_call_info.start_time); } else { m_us_cuoc_goi.datSTART_TIME = CIPConvert.ToDatetime("01/01/1900", "dd/MM/yyyy"); } m_us_cuoc_goi.dcDURATION = CIPConvert.ToDecimal(v_call_info.duration); m_us_cuoc_goi.dcID_TRANG_THAI = m_dc_id_trang_thai_cuoc_goi; m_us_cuoc_goi.dcRINGTIME = CIPConvert.ToDecimal(v_call_info.ringtime); m_us_cuoc_goi.Update(); BaseMessages.MsgBox_Infor("Đã lưu thông tin cuộc gọi thành công"); }
private void form_2_us_object() { System.Globalization.CultureInfo enUS = new System.Globalization.CultureInfo("en-US"); DateTime v_dat_out_result; m_us_cong_viec_moi.dcID_HOP_DONG_KHUNG = CIPConvert.ToDecimal(m_cbo_so_hop_dong.SelectedValue); m_us_cong_viec_moi.dcID_NOI_DUNG_TT = CIPConvert.ToDecimal(m_cbo_noi_dung_thanh_toan.SelectedValue); if (m_txt_so_luong.Text.Trim() != "") { m_us_cong_viec_moi.dcSO_LUONG_HE_SO = CIPConvert.ToDecimal(m_txt_so_luong.Text); } if (m_txt_don_gia.Text != "") { m_us_cong_viec_moi.dcDON_GIA = CIPConvert.ToDecimal(m_txt_don_gia.Text); } if (DateTime.TryParseExact(CIPConvert.ToStr(m_dat_ngay_bat_dau.SelectedDate), "dd/MM/yyyy", enUS, System.Globalization.DateTimeStyles.None, out v_dat_out_result)) { if (m_dat_ngay_bat_dau.SelectedDate != CIPConvert.ToDatetime("01/01/0001")) { m_us_cong_viec_moi.datNGAY_DAT_HANG = m_dat_ngay_bat_dau.SelectedDate; } // Nếu công việc này chưa đc đặt hàng, lấy ngày đầu tiên của tháng trước else { DateTime v_dat_today = DateTime.Today; int v_i_year = v_dat_today.Year; int v_i_month = v_dat_today.Month - 1; if (v_i_month == 0) { v_i_year = v_i_year - 1; v_i_month = 12; } DateTime v_dat_ngay_dat_hang = new DateTime(v_i_year, v_i_month, 1); m_us_cong_viec_moi.datNGAY_DAT_HANG = v_dat_ngay_dat_hang; } } m_us_cong_viec_moi.datNGAY_NGHIEM_THU = DateTime.Today; m_us_cong_viec_moi.dcSO_LUONG_NGHIEM_THU = CIPConvert.ToDecimal(m_txt_so_luong_nghiem_thu.Text.Trim()); m_us_cong_viec_moi.dcID_TRANG_THAI = CIPConvert.ToDecimal(m_cbo_trang_thai_cv_gv.SelectedValue); m_us_cong_viec_moi.strGHI_CHU = m_txt_ghi_chu.Text; m_us_cong_viec_moi.dcID_USER_NHAP = get_id_user_by_username(CIPConvert.ToStr(Session["Username"])); }
public void display(SinhVien i_obj_sinh_vien, string i_str_call_id) { load_data_2_cbo_truong(); m_e_form_mode = e_form_mode.TU_DONG_OPEN; m_txt_dien_thoai.Text = i_obj_sinh_vien.Dien_thoai; m_txt_ho_ten.Text = i_obj_sinh_vien.Ho_ten; m_txt_ma_hoc_vien.Text = i_obj_sinh_vien.Ma_sinh_vien; m_txt_ma_lop.Text = i_obj_sinh_vien.Ma_lop; if (i_obj_sinh_vien.Ngay_sinh != CIPConvert.ToDatetime("01/01/0001", "dd/MM/yyyy")) { m_dtp_ngay_sinh.Value = CIPConvert.ToDatetime(i_obj_sinh_vien.Ngay_sinh.ToShortDateString(), "dd/MM/yyyy"); } if (i_obj_sinh_vien.Truong != null) { m_cbo_truong.SelectedValue = i_obj_sinh_vien.Truong; } else { m_cbo_truong.SelectedIndex = 0; } if (i_obj_sinh_vien.Ho_Ten_QLHT != "" && i_obj_sinh_vien.Ho_Ten_QLHT != null) { m_txt_ho_ten_qlht.Text = i_obj_sinh_vien.Ho_Ten_QLHT; } if (i_obj_sinh_vien.Dien_thoai_QLHT != "" && i_obj_sinh_vien.Dien_thoai_QLHT != null) { m_txt_dien_thoai_qlht.Text = i_obj_sinh_vien.Dien_thoai_QLHT; } m_call_id = i_str_call_id; if (m_txt_ho_ten.Text.Trim() == "") { m_cmd_tim_hv_khac.Enabled = true; m_chk_hoc_vien_moi.Enabled = true; m_chk_hoc_vien_moi.Checked = true; } // this.ShowDialog(); this.Activate(); }
private void us_object_2_form(US_GD_GV_CONG_VIEC_MOI ip_us_v_gd_cv_moi) { m_cbo_so_hop_dong_loc.SelectedValue = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcID_HOP_DONG_KHUNG); US_DM_HOP_DONG_KHUNG v_us_dm_hd_khung = new US_DM_HOP_DONG_KHUNG(ip_us_v_gd_cv_moi.dcID_HOP_DONG_KHUNG); m_cbo_ten_giang_vien_loc.SelectedValue = CIPConvert.ToStr(v_us_dm_hd_khung.dcID_GIANG_VIEN); m_cbo_noi_dung_thanh_toan.SelectedValue = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcID_NOI_DUNG_TT); m_cbo_noi_dung_thanh_toan.Enabled = false; m_cbo_so_hop_dong_loc.Enabled = false; m_cmd_huy.ToolTip = m_cbo_so_hop_dong_loc.SelectedValue; m_cbo_noi_dung_thanh_toan.ToolTip = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcID_NOI_DUNG_TT); m_txt_so_luong.Text = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcSO_LUONG_HE_SO, "#"); //m_txt_don_gia.Text = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcDON_GIA, "#,###"); if (!m_us_cong_viec_moi.IsNGAY_DAT_HANGNull()) { m_dat_ngay_bat_dau.SelectedDate = CIPConvert.ToDatetime(CIPConvert.ToStr(m_us_cong_viec_moi.datNGAY_DAT_HANG, "dd/MM/yyyy"), "dd/MM/yyyy"); } //if (!m_us_cong_viec_moi.IsNGAY_NGHIEM_THUNull()) m_dat_ngay_nghiem_thu.SelectedDate = CIPConvert.ToDatetime(CIPConvert.ToStr(m_us_cong_viec_moi.datNGAY_NGHIEM_THU, "dd/MM/yyyy"), "dd/MM/yyyy"); m_cbo_trang_thai_cv_gv.SelectedValue = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcID_TRANG_THAI); m_txt_ghi_chu.Text = ip_us_v_gd_cv_moi.strGHI_CHU; }
private void load_data_2_cbo_po_quan_ly_chinh_va_phu() { US_HT_NGUOI_SU_DUNG v_us_nguoi_su_dung = new US_HT_NGUOI_SU_DUNG(); DS_HT_NGUOI_SU_DUNG v_ds_nguoi_su_dung = new DS_HT_NGUOI_SU_DUNG(); try { v_us_nguoi_su_dung.FillDataset(v_ds_nguoi_su_dung); // Load data to PO phụ trách chính Combobox m_cbo_po_phu_trach_chinh.DataSource = v_ds_nguoi_su_dung.HT_NGUOI_SU_DUNG; m_cbo_po_phu_trach_chinh.DataValueField = HT_NGUOI_SU_DUNG.TEN_TRUY_CAP; m_cbo_po_phu_trach_chinh.DataTextField = HT_NGUOI_SU_DUNG.TEN; m_cbo_po_phu_trach_chinh.SelectedIndex = 0; m_cbo_po_phu_trach_chinh.DataBind(); DataRow v_dr_none = v_ds_nguoi_su_dung.HT_NGUOI_SU_DUNG.NewHT_NGUOI_SU_DUNGRow(); v_dr_none[HT_NGUOI_SU_DUNG.ID] = "0"; v_dr_none[HT_NGUOI_SU_DUNG.TEN] = "Không có"; v_dr_none[HT_NGUOI_SU_DUNG.MAT_KHAU] = "123456"; v_dr_none[HT_NGUOI_SU_DUNG.TEN_TRUY_CAP] = "KHONG_CO"; v_dr_none[HT_NGUOI_SU_DUNG.NGAY_TAO] = CIPConvert.ToDatetime("01/01/2011"); v_dr_none[HT_NGUOI_SU_DUNG.NGUOI_TAO] = "ADMIN"; v_dr_none[HT_NGUOI_SU_DUNG.BUILT_IN_YN] = "N"; v_dr_none[HT_NGUOI_SU_DUNG.TRANG_THAI] = "0"; v_ds_nguoi_su_dung.HT_NGUOI_SU_DUNG.Rows.InsertAt(v_dr_none, 0); m_cbo_po_phu_trach_phu.DataSource = v_ds_nguoi_su_dung.HT_NGUOI_SU_DUNG; m_cbo_po_phu_trach_phu.DataValueField = HT_NGUOI_SU_DUNG.TEN_TRUY_CAP; m_cbo_po_phu_trach_phu.DataTextField = HT_NGUOI_SU_DUNG.TEN; m_cbo_po_phu_trach_phu.SelectedIndex = 0; m_cbo_po_phu_trach_phu.DataBind(); } catch (Exception v_e) { throw v_e; } }
private void fill_data_2_form(int i_row) { m_cbo_trang_thai_cau_hoi.SelectedValue = TU_DIEN_TRANG_THAI_GD_CAU_HOI_SV.DA_TRA_LOI; if (m_fg[i_row, (int)e_col_Number.ID_DANH_GIA] != null) { m_cbo_danh_gia_tra_loi.SelectedValue = CIPConvert.ToDecimal(m_fg[i_row, (int)e_col_Number.ID_DANH_GIA]); } if (m_fg[i_row, (int)e_col_Number.ID_LOAI_CAU_HOI] != null) { m_cbo_loai_cau_hoi_duoi.SelectedValue = CIPConvert.ToDecimal(m_fg[i_row, (int)e_col_Number.ID_LOAI_CAU_HOI]); } if (m_fg[i_row, (int)e_col_Number.NOI_DUNG_CAU_HOI] != null) { m_txt_cau_hoi.Text = CIPConvert.ToStr(m_fg[i_row, (int)e_col_Number.NOI_DUNG_CAU_HOI]); } if (m_fg[i_row, (int)e_col_Number.GHI_CHU_LICH_HEN] != null) { m_txt_ghi_chu_hen.Text = CIPConvert.ToStr(m_fg[i_row, (int)e_col_Number.GHI_CHU_LICH_HEN]); } if (m_fg[i_row, (int)e_col_Number.GHI_CHU_Y_KIEN_KHAC] != null) { m_txt_y_kien_khac.Text = CIPConvert.ToStr(m_fg[i_row, (int)e_col_Number.GHI_CHU_Y_KIEN_KHAC]); } if (m_fg[i_row, (int)e_col_Number.THOI_DIEM_HEN_GOI_LAI] != null) { m_dat_ngay_hen_goi_lai.Value = CIPConvert.ToDatetime(m_fg[i_row, (int)e_col_Number.THOI_DIEM_HEN_GOI_LAI].ToString().Substring(0, 10), "dd/MM/yyyy"); } if (m_fg[i_row, (int)e_col_Number.NOI_DUNG_TRA_LOI] != null) { m_rtb_cau_tra_loi.Text = CIPConvert.ToStr(m_fg[i_row, (int)e_col_Number.NOI_DUNG_TRA_LOI]); } //// //US_V_DM_CAU_HOI v_us_v_cau_hoi = new US_V_DM_CAU_HOI(); //DS_V_DM_CAU_HOI v_ds_v_cau_hoi = new DS_V_DM_CAU_HOI(); //v_us_v_cau_hoi.FillDataset(v_ds_v_cau_hoi,"where id = " + CIPConvert.ToStr(m_fg[i_row, (int)e_col_Number.ID_CAU_HOI])); //if (v_ds_v_cau_hoi.V_DM_CAU_HOI.Rows.Count > 0) //{ // m_rtb_cau_tra_loi.Text = v_ds_v_cau_hoi.V_DM_CAU_HOI[0][V_DM_CAU_HOI.CAU_TRA_LOI].ToString(); //} }
private void load_data_2_po_phu_trach() { US_HT_NGUOI_SU_DUNG v_us_nguoi_su_dung = new US_HT_NGUOI_SU_DUNG(); DS_HT_NGUOI_SU_DUNG v_ds_nguoi_su_dung = new DS_HT_NGUOI_SU_DUNG(); DataRow v_dr_none = v_ds_nguoi_su_dung.HT_NGUOI_SU_DUNG.NewHT_NGUOI_SU_DUNGRow(); v_dr_none[HT_NGUOI_SU_DUNG.ID] = "0"; v_dr_none[HT_NGUOI_SU_DUNG.TEN] = "Tất cả"; v_dr_none[HT_NGUOI_SU_DUNG.MAT_KHAU] = "123456"; v_dr_none[HT_NGUOI_SU_DUNG.TEN_TRUY_CAP] = "All"; v_dr_none[HT_NGUOI_SU_DUNG.NGAY_TAO] = CIPConvert.ToDatetime("01/01/2011"); v_dr_none[HT_NGUOI_SU_DUNG.NGUOI_TAO] = "ADMIN"; v_dr_none[HT_NGUOI_SU_DUNG.BUILT_IN_YN] = "N"; v_dr_none[HT_NGUOI_SU_DUNG.TRANG_THAI] = "0"; v_ds_nguoi_su_dung.HT_NGUOI_SU_DUNG.Rows.InsertAt(v_dr_none, 0); v_us_nguoi_su_dung.FillDataset(v_ds_nguoi_su_dung, " ORDER BY TEN_TRUY_CAP"); m_cbo_po_lap_bang_ke.DataTextField = HT_NGUOI_SU_DUNG.TEN; m_cbo_po_lap_bang_ke.DataValueField = HT_NGUOI_SU_DUNG.ID; m_cbo_po_lap_bang_ke.DataSource = v_ds_nguoi_su_dung; m_cbo_po_lap_bang_ke.DataBind(); }
private void us_object_2_form(US_V_GD_GV_CONG_VIEC_MOI ip_us_v_gd_cv_moi) { m_cbo_so_hop_dong.SelectedValue = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcID_HOP_DONG_KHUNG); load_data_2_cbo_noi_dung_tt_by_hd(); m_cbo_noi_dung_thanh_toan.SelectedValue = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcID_NOI_DUNG_TT); US_V_GD_HOP_DONG_NOI_DUNG_TT v_us_dm_noi_dung_tt = new US_V_GD_HOP_DONG_NOI_DUNG_TT(ip_us_v_gd_cv_moi.dcID_NOI_DUNG_TT); m_lbl_don_vi.Text = v_us_dm_noi_dung_tt.strDON_VI_TINH; m_cbo_noi_dung_thanh_toan.Enabled = false; m_cbo_so_hop_dong.Enabled = false; m_cbo_trang_thai_cv_gv.ToolTip = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcID_TRANG_THAI); // Cái này lưu trạng thái cũ m_cbo_noi_dung_thanh_toan.ToolTip = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcID_NOI_DUNG_TT); m_txt_so_luong.Text = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcSO_LUONG_HE_SO, "#"); m_txt_don_gia.Text = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcDON_GIA, "#,###"); if (!m_us_cong_viec_moi.IsNGAY_DAT_HANGNull()) { m_dat_ngay_bat_dau.SelectedDate = CIPConvert.ToDatetime(CIPConvert.ToStr(m_us_cong_viec_moi.datNGAY_DAT_HANG, "dd/MM/yyyy"), "dd/MM/yyyy"); } m_cbo_trang_thai_cv_gv.SelectedValue = CIPConvert.ToStr(ip_us_v_gd_cv_moi.dcID_TRANG_THAI); m_txt_ghi_chu.Text = ip_us_v_gd_cv_moi.strGHI_CHU; }
/// <summary> /// Search sử dụng session /// </summary> private void search_using_session() { try { m_ds_hop_dong_khung.Clear(); m_us_dm_hop_dong_khung.search_hop_dong_khung(CIPConvert.ToStr(Session["Snamekhung"]) , CIPConvert.ToStr(Session["Skeykhung"]) , CIPConvert.ToStr(Session["Ssohdkhung"]) , CIPConvert.ToDecimal(Session["Sloaihdkhung"]) , CIPConvert.ToDecimal(Session["Strangthaihdkhung"]) , CIPConvert.ToDecimal(Session["Squanlykhung"]) , CIPConvert.ToDecimal(Session["Sthangkykhung"]) , CIPConvert.ToDecimal(Session["Snamkykhung"]) , CIPConvert.ToDatetime(CIPConvert.ToStr(Session["Sdathieuluckhung"])) , CIPConvert.ToDatetime(CIPConvert.ToStr(Session["Sdatketthuc"])) , CIPConvert.ToStr(Session["Spokhung"]) , m_ds_hop_dong_khung , CIPConvert.ToStr(Session["Username"])); m_lbl_loc_du_lieu.Text = "Kết quả lọc dữ liệu: " + m_ds_hop_dong_khung.V_DM_HOP_DONG_KHUNG.Rows.Count + " bản ghi"; if (m_ds_hop_dong_khung.V_DM_HOP_DONG_KHUNG.Rows.Count == 0) { m_lbl_thong_bao.Text = "Không có bản ghi nào phù hợp"; if (m_grv_dm_danh_sach_hop_dong_khung.Visible == true) { m_grv_dm_danh_sach_hop_dong_khung.Visible = false; } return; } m_grv_dm_danh_sach_hop_dong_khung.Visible = true; m_grv_dm_danh_sach_hop_dong_khung.DataSource = m_ds_hop_dong_khung.V_DM_HOP_DONG_KHUNG; m_grv_dm_danh_sach_hop_dong_khung.DataBind(); } catch (Exception ve) { throw ve; } }