Exemplo n.º 1
0
        protected void btnThemMoi1_Click(object sender, EventArgs e)
        {
            //lay dot danh gia truoc ra lam chuan
            int idDotDanhCopy = ConvertUtility.ToInt32(DotDanhGiaController.GetDaultDotDanhGia().Rows[0]["ID"]);

            #region Tao dot danh gia moi

            DotDanhGiaInfo infoDotDanhGia = new DotDanhGiaInfo();

            infoDotDanhGia.Ten = txtTen.Text.Trim();
            infoDotDanhGia.ThoiGianBatDau = ConvertUtility.ToDateTime(txtThoiGianBatDau.Text);
            infoDotDanhGia.ThoiGianKetThuc = ConvertUtility.ToDateTime(txtThoiGianKetThuc.Text);
            infoDotDanhGia.TrangThai = ConvertUtility.ToInt32(dropTypeOf.SelectedValue);
            infoDotDanhGia.DangChay = ConvertUtility.ToInt32(dropStatus.SelectedValue);
            infoDotDanhGia.IsDefault = ConvertUtility.ToInt32(dropChuan.SelectedValue);

            infoDotDanhGia.Nam = infoDotDanhGia.ThoiGianKetThuc.Year;
            infoDotDanhGia.Thang = infoDotDanhGia.ThoiGianKetThuc.Month;

            int idDotDanhGia = DotDanhGiaController.Insert(infoDotDanhGia);

            #endregion

            DataTable dtTrungTam = BoPhanController.BoPhan_GetAllActive();

            foreach (DataRow itemTrungTam in dtTrungTam.Rows)
            {
                DataTable source = QuanLyCongViecKTXVaPSController.GetAllNhanVienTheoQLVaDotDanhGia(ConvertUtility.ToInt32(itemTrungTam["ID"]), idDotDanhCopy);

                UpdateNhanVienTheoNDG(source, idDotDanhGia, ConvertUtility.ToInt32(itemTrungTam["ID"]));

                UpdateNhanVienVaoDotDanhGia(source, idDotDanhGia, ConvertUtility.ToInt32(itemTrungTam["ID"]));
            }
        }
Exemplo n.º 2
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            int id = ConvertUtility.ToInt32(Request.QueryString["id"]);

            DotDanhGiaInfo info = new DotDanhGiaInfo();

            info.ID = id;
            info.Ten = txtTen.Text.Trim();
            info.ThoiGianBatDau = ConvertUtility.ToDateTime(txtThoiGianBatDau.Text);
            info.ThoiGianKetThuc = ConvertUtility.ToDateTime(txtThoiGianKetThuc.Text);
            info.TrangThai = ConvertUtility.ToInt32(dropTypeOf.SelectedValue);
            info.DangChay = ConvertUtility.ToInt32(dropStatus.SelectedValue);
            info.IsDefault = ConvertUtility.ToInt32(dropChuan.SelectedValue);

            info.Nam = info.ThoiGianKetThuc.Year;
            info.Thang = info.ThoiGianKetThuc.Month;

            DotDanhGiaController.Update(info);
        }
Exemplo n.º 3
0
 public override void UpdateDotDanhGia(DotDanhGiaInfo _DotDanhGiaInfo)
 {
     SqlHelper.ExecuteNonQuery(this.ConnectionString, "DotDanhGia_Update", _DotDanhGiaInfo.ID, _DotDanhGiaInfo.Ten, _DotDanhGiaInfo.TrangThai, _DotDanhGiaInfo.ThoiGianBatDau, _DotDanhGiaInfo.ThoiGianKetThuc, _DotDanhGiaInfo.DangChay, _DotDanhGiaInfo.IsDefault, _DotDanhGiaInfo.Nam, _DotDanhGiaInfo.Thang);
 }
Exemplo n.º 4
0
 public override int InsertDotDanhGia(DotDanhGiaInfo _DotDanhGiaInfo)
 {
     return (int)SqlHelper.ExecuteScalar(this.ConnectionString, "DotDanhGia_Insert", _DotDanhGiaInfo.Ten, _DotDanhGiaInfo.TrangThai, _DotDanhGiaInfo.ThoiGianBatDau, _DotDanhGiaInfo.ThoiGianKetThuc, _DotDanhGiaInfo.DangChay, _DotDanhGiaInfo.IsDefault, _DotDanhGiaInfo.Nam, _DotDanhGiaInfo.Thang);
 }
Exemplo n.º 5
0
 public static void Update(DotDanhGiaInfo _DotDanhGiaInfo)
 {
     DataAccessProvider.Instance().UpdateDotDanhGia(_DotDanhGiaInfo);
 }
Exemplo n.º 6
0
 public static int Insert(DotDanhGiaInfo _DotDanhGiaInfo)
 {
     return(DataAccessProvider.Instance().InsertDotDanhGia(_DotDanhGiaInfo));
 }
Exemplo n.º 7
0
 public abstract void UpdateDotDanhGia(DotDanhGiaInfo _DotDanhGiaInfo);
Exemplo n.º 8
0
 public abstract int InsertDotDanhGia(DotDanhGiaInfo _DotDanhGiaInfo);