Esempio n. 1
0
    private void CreateKetQuaDanhGiaByMaCB(string maCB)
    {
        List <DAL.TieuChi_DotDanhGia> tieuchis = new TieuChi_DotDanhGiaController().GetByMaCanBo(maCB);

        foreach (var item in tieuchis)
        {
            DAL.KetQuaDanhGia info = new DAL.KetQuaDanhGia()
            {
                CreatedBy            = CurrentUser.ID,
                CreatedDate          = DateTime.Now,
                Diem                 = 0,
                IdTieuChi_DotDanhGia = item.ID,
                IsQuanLyDanhGia      = false,
                MaCB                 = maCB,
                NhanXet              = ""
            };
            new KetQuaDanhGiaController().Insert(info);
        }
    }
Esempio n. 2
0
    private void CreateKetQuaDanhGiaByIdTieuChiDotDanhGia(TieuChi_DotDanhGiaInfo tcd)
    {
        DataTable canbos = new CanBoDuocDanhGiaController().GetByMaDotDanhGia(tcd.MaDotDanhGia);

        foreach (DataRow item in canbos.Rows)
        {
            DAL.KetQuaDanhGia tmp = new KetQuaDanhGiaController().GetByMaCBvaIdTieuChiDotDanhGia(item["MaCB"].ToString(), tcd.ID);
            if (tmp == null)
            {
                DAL.KetQuaDanhGia info = new DAL.KetQuaDanhGia()
                {
                    CreatedBy            = CurrentUser.ID,
                    CreatedDate          = DateTime.Now,
                    Diem                 = 0,
                    IdTieuChi_DotDanhGia = tcd.ID,
                    IsQuanLyDanhGia      = false,
                    MaCB                 = item["MaCB"].ToString(),
                    NhanXet              = ""
                };
                new KetQuaDanhGiaController().Insert(info);
            }
        }
    }