示例#1
0
    public List <ViewALLCB> TimKiemDangVien(string username, string password, TimKiem tk)
    {
        try
        {
            authen a       = new authen();
            bool   bAuthen = a.fAuthen(username, password);
            if (bAuthen)
            {
                var ab =
                    (from k in db.ViewALLCBs
                     where (tk.HoTen != "" ? k.HoTenKhaiSinh.Contains(tk.HoTen) : true) &&
                     (tk.MaCB != "" ? k.MaCoSoDangQLDangVien.Contains(tk.MaCB) : true) &&
                     (tk.GioiTinh != "" ? k.GioiTinh == tk.GioiTinh : true) &&
                     (tk.ChuyenMonNghiepVu != "" ? k.ChuyenNganh == tk.ChuyenMonNghiepVu : true)
                     select k).Where(x => x.KhongLaDangVien != 1).ToList();

                return(ab);
            }
            else
            {
                return(null);
            }
        }
        catch (Exception ex)
        {
            return(null);
        }
    }
        private dynamic DocDanhSach(string tuKhoa = "", int?trangHienTai = 1)
        {
            var currenPage      = (trangHienTai == null || trangHienTai < 1) ? 1 : trangHienTai.Value;
            int soDongTrenTrang = PageNumber.Default;
            int viTriBatDau     = (currenPage - 1) * soDongTrenTrang;
            int tongSoDong      = 0;
            var input           = new TimKiem
            {
                TuKhoa = tuKhoa.Trim().ToLower(),

                ViTriBatDau  = viTriBatDau,
                ViTriKetThuc = viTriBatDau + soDongTrenTrang
            };
            var output = XuLyAPI.ApiJsonPost(APIUrl.ThongBaoKhan.DocDanhSachPhanTrang, input) as CommonOutput;

            if (output == null)
            {
                throw new Exception(ConstantValues.Message.LoiServer);
            }
            if (output.KetQua != 1)
            {
                throw new Exception(output.ThongBao);
            }
            var duLieuOutput = JsonConvert.DeserializeObject <Models.ThongBaoKhanModel.Output.DocDanhSach>(output.DuLieu.ToString());
            var kq           = new Models.ThongBaoKhanModel.Output.DocDanhSach();

            kq.TrangHienTai = currenPage;
            tongSoDong      = duLieuOutput.TongSoDong;
            kq.TongSoTrang  = (tongSoDong % soDongTrenTrang > 0) ? tongSoDong / soDongTrenTrang + 1 : tongSoDong / soDongTrenTrang;
            kq.TongSoDong   = tongSoDong;
            kq.DanhSach     = duLieuOutput.DanhSach;
            return(kq);
        }
示例#3
0
 public List <ViewALLCB> TimKiemCanBo(string username, string password, TimKiem tk)
 {
     try
     {
         authen a       = new authen();
         bool   bAuthen = a.fAuthen(username, password);
         if (bAuthen)
         {
             return((from k in db.ViewALLCBs
                     where (tk.HoTen != "" ? k.HoTenKhaiSinh.Contains(tk.HoTen) : true) &&
                     (tk.MaCB != "" ? k.SoHieuCB.Contains(tk.MaCB) : true) &&
                     (tk.GioiTinh != "" ? k.GioiTinh == tk.GioiTinh : true) &&
                     (tk.TrinhDoHocVan != "" ? k.TrinhDoHocVan == tk.TrinhDoHocVan : true) &&
                     (tk.NgheNghiep != "" ? k.NgheNghiepKhiTuyenDung == tk.NgheNghiep : true) &&
                     (tk.ThanhPhanGiaDinh != "" ? k.ThanhPhanGiaDinh == tk.ThanhPhanGiaDinh : true) &&
                     (tk.DanToc != "" ? k.DanToc == tk.DanToc : true) &&
                     (tk.TonGiao != "" ? k.TonGiao == tk.TonGiao : true)
                     select k).ToList());
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#4
0
        private void buttonTimKiem_Click(object sender, EventArgs e)
        {
            this.Hide();
            TimKiem formTK = new TimKiem();

            formTK.FormClosed += FormTK_FormClosed;
            formTK.Show();
        }
示例#5
0
        private void Detail_FormClosed(object sender, FormClosedEventArgs e)
        {
            BIENTOANCUC.dt        = null;
            BIENTOANCUC.imagepath = null;
            TimKiem tk = new TimKiem();

            this.Close();
            tk.Show();
        }
示例#6
0
 public List <Prod_CCTC_GetAllSale_Result> GetAllSale(TimKiem timkiem)
 {
     using (var db = new ERP_DATABASEEntities())
     {
         var query  = db.Database.SqlQuery <Prod_CCTC_GetAllSale_Result>("Prod_CCTC_GetAllSale @macongty, @phongsale, @phongmarketing", new SqlParameter("macongty", timkiem.macongty), new SqlParameter("phongsale", timkiem.phongsale), new SqlParameter("phongmarketing", timkiem.phongmarketing));
         var result = query.ToList();
         return(result);
     }
 }
示例#7
0
 private void Load_TimKiem(string text)
 {
     try
     {
         TimKiem   tk = new TimKiem();
         DataTable dt = tk.TKCoBan(text);
         dgvListTaiLieu.DataSource = dt;
         dgvListTaiLieu.Refresh();
     }
     catch (Exception)
     {
         throw;
     }
 }
示例#8
0
        private void btnTimKiem_Click(object sender, EventArgs e)
        {
            try
            {
                TimKiem   tk = new TimKiem();
                DataTable dt = tk.TKNangCao(txtTimKiem.Text, cbTimTheo.SelectedValue.ToString(), Convert.ToInt32(cbLoaiTimTheo.SelectedValue));
                dgvListTaiLieu.DataSource = dt;
                dgvListTaiLieu.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            //dataGridView1.DataSource = ds.Tables[0];
            //cm = BindingContext[this.ds.Tables[0]] as CurrencyManager;
            //label5.Text = cm.Count.ToString();
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string tukhoa = Request.QueryString["KeyKhoa"];

            if (!string.IsNullOrEmpty(tukhoa))
            {
                TimKiem tk = new TimKiem();

                DataTable dtb = tk.TimKiemBaiViet(tukhoa);

                this.Title = "Tìm kiếm: Keyword= " + tukhoa;

                if (dtb.Rows.Count > 0)
                {
                    pnSearch.GroupingText = "Tìm thấy <u>" + dtb.Rows.Count + "</u> kết quả với từ khóa ''<b>" + tukhoa + "</b>''";
                    //Download source code tại Sharecode.vn
                    dtlSearch.DataSource = dtb;
                    dtlSearch.DataBind();
                }
            }
        }
    }
示例#10
0
        private void btnTimKiem_Click(object sender, EventArgs e)
        {
            TimKiem frm = new TimKiem();

            frm.Show();
        }
示例#11
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            TimKiem tk = new TimKiem();

            tk.Show();
        }