Esempio n. 1
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            int id = ConvertUtility.ToInt32(Request.QueryString["id"]);

            if (id > 0)
            {
                XepLoaiNhomInfo info = XepLoaiNhomController.GetInfo(id);

                if (info != null)
                {
                    dropNhom.SelectedValue    = info.IDNhomNhanVien.ToString();
                    dropXepLoai.SelectedValue = info.IDXepLoai.ToString();
                    txtMin.Text = info.Min.ToString();
                    txtMax.Text = info.Max.ToString();
                }
            }
            else
            {
                btnUpdate.Visible = false;
            }
            dgrXepLoaiNhom.DataSource = XepLoaiNhomController.GetAll();
            dgrXepLoaiNhom.DataBind();
        }
Esempio n. 2
0
        protected void btnThemMoi_Click(object sender, EventArgs e)
        {
            XepLoaiNhomInfo info = new XepLoaiNhomInfo();

            info.IDNhomNhanVien = ConvertUtility.ToInt32(dropNhom.SelectedValue);
            info.IDXepLoai      = ConvertUtility.ToInt32(dropXepLoai.SelectedValue);
            info.Min            = ConvertUtility.ToInt32(txtMin.Text);
            info.Max            = ConvertUtility.ToInt32(txtMax.Text);

            XepLoaiNhomController.Insert(info);
        }
Esempio n. 3
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            int id = ConvertUtility.ToInt32(Request.QueryString["id"]);

            XepLoaiNhomInfo info = new XepLoaiNhomInfo();

            info.ID             = id;
            info.IDNhomNhanVien = ConvertUtility.ToInt32(dropNhom.SelectedValue);
            info.IDXepLoai      = ConvertUtility.ToInt32(dropXepLoai.SelectedValue);
            info.Min            = ConvertUtility.ToInt32(txtMin.Text);
            info.Max            = ConvertUtility.ToInt32(txtMax.Text);

            XepLoaiNhomController.Update(info);
        }
Esempio n. 4
0
 public abstract void UpdateXepLoaiNhom(XepLoaiNhomInfo _XepLoaiNhomInfo);
Esempio n. 5
0
 public abstract int InsertXepLoaiNhom(XepLoaiNhomInfo _XepLoaiNhomInfo);