Ejemplo n.º 1
0
        public void Add_Customer(string fName, string lName, string phone, string E_Mail, byte[] cImage, string checker)
        {
            dal.opendb();
            SqlParameter[] param = new SqlParameter[6];
            param[0]       = new SqlParameter("@fName", SqlDbType.VarChar, 50);
            param[0].Value = fName;

            param[1]       = new SqlParameter("@lName", SqlDbType.VarChar, 50);
            param[1].Value = lName;

            param[2]       = new SqlParameter("@phone", SqlDbType.VarChar, 15);
            param[2].Value = phone;

            param[3]       = new SqlParameter("@E_Mail", SqlDbType.VarChar, 50);
            param[3].Value = E_Mail;

            param[4]       = new SqlParameter("@cImage", SqlDbType.Image);
            param[4].Value = cImage;

            param[5]       = new SqlParameter("@checker", SqlDbType.VarChar, 50);
            param[5].Value = checker;

            dal.execmd("Add_Customer", param);
            dal.closedb();
        }
Ejemplo n.º 2
0
        public DataTable Login(string id, string pwd)
        {
            SqlParameter[] param = new SqlParameter[2];
            param[0]       = new SqlParameter("@id", SqlDbType.VarChar, 50);
            param[0].Value = id;

            param[1]       = new SqlParameter("@pwd", SqlDbType.VarChar, 50);
            param[1].Value = pwd;

            DAL.opendb();
            DataTable dt = new DataTable();

            dt = DAL.select("SP_Login", param);
            DAL.closedb();
            return(dt);
        }
Ejemplo n.º 3
0
        public DataTable Get_Categories()
        {
            dal.opendb();
            DataTable dt = new DataTable();

            dt = dal.select("Get_Categories", null);
            dal.closedb();
            return(dt);
        }
Ejemplo n.º 4
0
        public DataTable Get_Last_Id_For_Print()
        {
            DataTable dt = new DataTable();

            DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
            dal.opendb();
            dt = dal.select("Get_Last_Id_For_Print", null);
            dal.closedb();
            return(dt);
        }
Ejemplo n.º 5
0
        public void Add_Order(DateTime Date, string Description, string Salesman, int cID)
        {
            dal.opendb();
            SqlParameter[] param = new SqlParameter[4];
            param[0]       = new SqlParameter("@Date", SqlDbType.DateTime);
            param[0].Value = Date;

            param[1]       = new SqlParameter("@Description", SqlDbType.VarChar, 50);
            param[1].Value = Description;

            param[2]       = new SqlParameter("@Salesman", SqlDbType.VarChar, 50);
            param[2].Value = Salesman;

            param[3]       = new SqlParameter("@cID", SqlDbType.Int);
            param[3].Value = cID;

            dal.execmd("Add_Order", param);
            dal.closedb();
        }
Ejemplo n.º 6
0
        public DataTable Search_Orders(string criterion)
        {
            DataTable dt = new DataTable();

            DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
            dal.opendb();
            SqlParameter[] param = new SqlParameter[1];

            param[0]       = new SqlParameter("@criterion", SqlDbType.VarChar, 50);
            param[0].Value = criterion;
            dt             = dal.select("Search_Orders", param);
            dal.closedb();
            return(dt);
        }
Ejemplo n.º 7
0
        public DataTable Get_Order_Details(int oID)
        {
            DataTable dt = new DataTable();

            DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
            dal.opendb();
            SqlParameter[] param = new SqlParameter[1];

            param[0]       = new SqlParameter("oID", SqlDbType.Int);
            param[0].Value = oID;
            dt             = dal.select("Get_Order_Details", param);
            dal.closedb();
            return(dt);
        }