Exemplo n.º 1
0
        private void btn_del_ip_rule_Click(object sender, EventArgs e)
        {
            IpCollectionBll bll = new IpCollectionBll();

            bll.Delete(int.Parse(lb_ip_rule_id.Text));
            Init_Ip_Rule();
        }
Exemplo n.º 2
0
        private void Init_Ip_Rule()
        {
            IpCollectionBll bll = new IpCollectionBll();
            DataTable       dt  = bll.GetAll();

            dgv_ip_rule.DataSource = dt;
        }
Exemplo n.º 3
0
        private void btn_add_ip_rule_Click(object sender, EventArgs e)
        {
            IpCollectionBll    bll  = new IpCollectionBll();
            IpCollectionEntity info = new IpCollectionEntity()
            {
                RuleName = txt_ip_rule_name.Text,
                RuleUrl  = txt_ip_rule_url.Text,
                RuleRex  = rtxt_ip_rule_rex.Text
            };

            bll.Add(info);
            Init_Ip_Rule();
        }
Exemplo n.º 4
0
        private void btn_edit_ip_rule_Click(object sender, EventArgs e)
        {
            IpCollectionEntity info = new IpCollectionEntity()
            {
                RuleName = txt_ip_rule_name.Text,
                RuleUrl  = txt_ip_rule_url.Text,
                RuleRex  = rtxt_ip_rule_rex.Text,
                Id       = int.Parse(lb_ip_rule_id.Text)
            };
            IpCollectionBll bll = new IpCollectionBll();

            bll.Update(info);
            Init_Ip_Rule();
        }