Exemplo n.º 1
0
        public int Count_Danhsachnhanvien_guiemail(daotao_taolop_chitietModels clparam)
        {
            logger.Start("CountRows_Danhsachlophoc");
            int iResult = 0;

            try
            {
                Hashtable param = new Hashtable();
                param = base.SetDataToHashtable(false, clparam);

                if (param["malop"].ToString() == "0" || param["malop"].ToString() == "undefined" || param["malop"].ToString() == null)
                {
                    param["malop"] = "";
                }

                if (param["hovaten"].ToString() == "0" || param["hovaten"].ToString() == "undefined" || param["hovaten"].ToString() == null)
                {
                    param["hovaten"] = "";
                }

                if (param["manv"].ToString() == "0" || param["manv"].ToString() == "undefined" || param["manv"].ToString() == null)
                {
                    param["manv"] = "";
                }

                //if (param["maphongban"].ToString() == "0")
                //    param["maphongban"] = "";

                iResult = (int)sqlMap.ExecuteQueryForObject("Quanlylopdaotao.Count_Danhsachnhanvien_guiemail", param);
            }
            catch (Exception ex)
            {
                sqlMap.RollbackTransaction();
                iResult = 0;
                logger.Error(ex.Message);
            }
            logger.End("CountRows_Danhsachlophoc");
            return(iResult);
        }
Exemplo n.º 2
0
        public List <daotao_taolop_chitietModels> SelectRows_Danhsachnhanvien_guiemail(daotao_taolop_chitietModels clParam, int trangbd, int trangkt)
        {
            logger.Start("SelectRows_Danhsachnhanvien_guiemail");
            List <daotao_taolop_chitietModels> lstResult = new List <daotao_taolop_chitietModels>();

            try
            {
                Hashtable param = new Hashtable();
                param = base.SetDataToHashtable(false, clParam);
                if (param["malop"].ToString() == "0" || param["malop"].ToString() == "undefined" || param["malop"].ToString() == null)
                {
                    param["malop"] = "";
                }

                if (param["hovaten"].ToString() == "0" || param["hovaten"].ToString() == "undefined" || param["hovaten"].ToString() == null)
                {
                    param["hovaten"] = "";
                }

                if (param["manv"].ToString() == "0" || param["manv"].ToString() == "undefined" || param["manv"].ToString() == null)
                {
                    param["manv"] = "";
                }

                param["trangbd"] = trangbd;
                param["trangkt"] = trangkt;
                IList        ilist = sqlMap.ExecuteQueryForList("Quanlylopdaotao.SelectRows_Danhsachnhanvien_guiemail", param);
                CastDataType cast  = new CastDataType();
                lstResult = cast.AdvanceCastDataToList <daotao_taolop_chitietModels>(ilist);
            }
            catch (Exception ex)
            {
                logger.Error("Loi ---> " + ex.Message);
            }
            logger.End("SelectRows_Danhsachnhanvien_guiemail");
            return(lstResult);
        }