예제 #1
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            CusProps p = new CusProps();

            p.C_id      = txt_eid.Text;
            p.C_name    = txt_name.Text;
            p.C_cell    = txt_cell.Text;
            p.C_address = txt_address.Text;
            p.C_cnic    = cnic.Text;

            CusBLL cus = new CusBLL();

            if (cus.updateCusBLL(p))
            {
                massege("Record Updated Successfully");
                txt_eid.Text     = "";
                txt_name.Text    = "";
                txt_cell.Text    = "";
                txt_address.Text = "";
                cnic.Text        = "";
            }
            else
            {
                massege("Record Updated Unsuccessfull");
            }
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            CusProps p = new CusProps();

            p.C_id      = txt_eid.Text;
            p.C_name    = txt_name.Text;
            p.C_cell    = txt_cell.Text;
            p.C_address = txt_address.Text;
            p.C_cnic    = cnic.Text;

            CusBLL cus = new CusBLL();

            if (cus.updateCusBLL(p))
            {
                MessageBox.Show("Record Updated Successfully");
                txt_eid.Text     = "";
                txt_name.Text    = "";
                txt_cell.Text    = "";
                txt_address.Text = "";
                cnic.Text        = "";
            }
            else
            {
                MessageBox.Show("Record Updated Unsuccessfull");
            }
        }
예제 #3
0
        protected void Button4_Click(object sender, EventArgs e)
        {
            CusProps p = new CusProps();

            p.C_id = txt_eid.Text;

            CusBLL    cus = new CusBLL();
            DataTable dt  = cus.searchCusBLL(p);

            if (dt.Rows.Count > 0)
            {
                massege("Record Found..!");
                txt_name.Text    = dt.Rows[0]["name"].ToString();
                cnic.Text        = dt.Rows[0]["cnic"].ToString();
                txt_cell.Text    = dt.Rows[0]["cell"].ToString();
                txt_address.Text = dt.Rows[0]["address"].ToString();
            }
            else
            {
                massege("Record Not Found..!");
                txt_name.Text    = "";
                txt_cell.Text    = "";
                txt_address.Text = "";
                cnic.Text        = "";
            }
        }
예제 #4
0
        private void button3_Click(object sender, EventArgs e)
        {
            CusProps p = new CusProps();

            p.C_id = txt_eid.Text;

            CusBLL    cus = new CusBLL();
            DataTable dt  = cus.searchCusBLL(p);

            if (dt.Rows.Count > 0)
            {
                MessageBox.Show("Record Found..!");
                txt_name.Text    = dt.Rows[0]["name"].ToString();
                cnic.Text        = dt.Rows[0]["cnic"].ToString();
                txt_cell.Text    = dt.Rows[0]["cell"].ToString();
                txt_address.Text = dt.Rows[0]["address"].ToString();
            }
            else
            {
                MessageBox.Show("Record Not Found..!");
            }
        }
예제 #5
0
        public DataTable searchCusDAL(CusProps p)
        {
            string query = "select * from customer where cus_id ='" + p.C_id + "'";

            return(db.search(query));
        }
예제 #6
0
        public bool updateCusDAL(CusProps p)
        {
            string query = "update customer set name = '" + p.C_name + "',cnic = '" + p.C_cnic + "',cell = '" + p.C_cell + "',address = '" + p.C_address + "' where cus_id = '" + p.C_id + "'; ";

            return(db.query_iud(query));
        }
예제 #7
0
        public bool deleteCusDAL(CusProps p)
        {
            string query = "delete from customer where cus_id ='" + p.C_id + "'";

            return(db.query_iud(query));
        }
예제 #8
0
        public bool insertCusDAL(CusProps p)
        {
            string query = "INSERT INTO customer VALUES('" + p.C_id + "','" + p.C_name + "','" + p.C_cnic + "','" + p.C_cell + "','" + p.C_address + "')";

            return(db.query_iud(query));
        }
예제 #9
0
        public DataTable searchCusBLL(CusProps p)
        {
            CusDAL obj = new CusDAL();

            return(obj.searchCusDAL(p));
        }
예제 #10
0
        public bool updateCusBLL(CusProps p)
        {
            CusDAL obj = new CusDAL();

            return(obj.updateCusDAL(p));
        }
예제 #11
0
        public bool deleteCusBLL(CusProps p)
        {
            CusDAL obj = new CusDAL();

            return(obj.deleteCusDAL(p));
        }
예제 #12
0
        public bool insertCusBLL(CusProps p)
        {
            CusDAL obj = new CusDAL();

            return(obj.insertCusDAL(p));
        }