コード例 #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();
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #4
0
 public abstract void UpdateXepLoaiNhom(XepLoaiNhomInfo _XepLoaiNhomInfo);
コード例 #5
0
 public abstract int InsertXepLoaiNhom(XepLoaiNhomInfo _XepLoaiNhomInfo);