示例#1
0
        /////////////////////////////////
        public DataTable getAllSubb()
        {
            DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


            DataTable dt = new DataTable();


            dt = Dal.ExecutQuery("getAllSubb", null);

            return(dt);
        }
示例#2
0
        /////////////////////////////////
        public DataTable ShowAll()
        {
            DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


            DataTable dt = new DataTable();


            dt = Dal.ExecutQuery("getAllCust", null);

            return(dt);
        }
示例#3
0
        public DataTable GetLastorderIdForPrint()
        {
            DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


            DataTable dt = new DataTable();


            dt = Dal.ExecutQuery("GetLastorderId", null);

            return(dt);
        }
示例#4
0
        public DataTable GetConId()
        {
            DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


            DataTable dt = new DataTable();


            dt = Dal.ExecutQuery("GetLastItemId", null);

            return(dt);
        }
示例#5
0
      //ادارة البضائع
      public DataTable ShowAll()
      {
          DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


          DataTable dt = new DataTable();


          dt = Dal.ExecutQuery("ShowClothes", null);
          Dal.Close();
          return(dt);
      }
示例#6
0
        public DataTable ShowAllGetMoney()
        {
            DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


            DataTable dt = new DataTable();


            dt = Dal.ExecutQuery("ShowAllGetMoney", null);

            return(dt);
        }
示例#7
0
        /// <summary>
        /// /////////////////////////////////////
        /// </summary>
        /// <param name="id"></param>
        ///

        public DataTable SearchSubb(String id)
        {
            DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


            DataTable dt = new DataTable();

            SqlParameter[] param = new SqlParameter[1];

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

            dt = Dal.ExecutQuery("SearchSubb", param);

            return(dt);
        }
示例#8
0
      // thsi is for checing hte primary key
      public DataTable VertifyCloth(String id)
      {
          DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


          DataTable dt = new DataTable();

          SqlParameter[] param = new SqlParameter[1];

          param[0]       = new SqlParameter("@id_item", SqlDbType.VarChar, 30);
          param[0].Value = id;

          dt = Dal.ExecutQuery("VertifyItemId", param);
          Dal.Close();
          return(dt);
      }
示例#9
0
      /// <summary>
      /// /////////////////////////////////////////////
      /// </summary>
      /// <param name="id"></param>
      /// <returns></returns>
      public DataTable Get_image(string id)
      {
          DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


          DataTable dt = new DataTable();

          SqlParameter[] param = new SqlParameter[1];

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

          dt = Dal.ExecutQuery("Get_image", param);
          Dal.Close();
          return(dt);
      }
示例#10
0
        public DataTable GetProfitPeforeUpdating(int order_id)
        {
            DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();
            DataTable            dt  = new DataTable();

            SqlParameter[] param = new SqlParameter[1];


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


            dt = Dal.ExecutQuery("GetProfitPeforeUpdating", param);

            return(dt);
        }
示例#11
0
        /// <summary>
        /// //////////////// GEt Order Details for Update
        /// </summary>
        /// <param name="order_id"></param>
        /// <returns></returns>

        public DataTable GetDetailsByOrderID(int order_id)
        {
            DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


            DataTable dt = new DataTable();

            SqlParameter[] param = new SqlParameter[1];

            param[0]       = new SqlParameter("@order_Id", SqlDbType.Int);
            param[0].Value = order_id;


            dt = Dal.ExecutQuery("GetDetailsByOrderID", param);

            return(dt);
        }
示例#12
0
      public DataTable SubbliersFetch()
      {
          // this method is for calling the stored procedure
          // ths equals the callable ststment java Video 89
          // every data base has its own language to store stored procedure
          DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


          DataTable dt = new DataTable();

          // this will pass the name of the procedure
          // and the method will deal with the prcedure
          // the load of the sql statment will be dine in the server
          dt = Dal.ExecutQuery("SubbliersFetch", null);
          Dal.Close();
          return(dt);
      }
示例#13
0
        //////////////////////
        /// <summary>
        /// هذه الدالة تتحقق من الكمية وان لاتتعدر الكمية
        /// </summary>
        /// <param name="id"></param>
        /// <param name="qty"></param>
        /// <returns></returns>
        public DataTable VerifyQty(String id, int qty)
        {
            DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


            DataTable dt = new DataTable();

            SqlParameter[] param = new SqlParameter[2];

            param[0]       = new SqlParameter("@item_id", SqlDbType.VarChar, 30);
            param[0].Value = id;
            param[1]       = new SqlParameter("@Qty_entered", SqlDbType.Int);
            param[1].Value = qty;

            dt = Dal.ExecutQuery("VerifyQty", param);

            return(dt);
        }
示例#14
0
        //
        public DataTable GetQtyBeforeDelete(string item_id, int order_id)
        {
            DAL.DataAccesssLayer Dal = new DAL.DataAccesssLayer();


            DataTable dt = new DataTable();

            SqlParameter[] param = new SqlParameter[2];

            param[0]       = new SqlParameter("@item_id", SqlDbType.VarChar, 30);
            param[0].Value = item_id;
            param[1]       = new SqlParameter("@order_id", SqlDbType.Int);
            param[1].Value = order_id;


            dt = Dal.ExecutQuery("GetQtyBeforeDelete", param);

            return(dt);
        }
示例#15
0
        // these parameter willbe snet to te stored proc in the databse

        public DataTable Login(String id, String pass)
        {
            // this method is for calling the stored procedure
            // ths equals the callable ststment java Video 89
            // every data base has its own language to store stored procedure
            DAL.DataAccesssLayer Dal   = new DAL.DataAccesssLayer();
            SqlParameter[]       param = new SqlParameter[2];

            param[0]       = new SqlParameter("@ID", SqlDbType.VarChar, 20);
            param[0].Value = id;

            param[1]       = new SqlParameter("@pasword", SqlDbType.VarChar, 20);
            param[1].Value = pass;

            Dal.Open();
            DataTable dt = new DataTable();

            // this will pass the name of the procedure
            // and the method will deal with the prcedure
            // the load of the sql statment will be dine in the server
            dt = Dal.ExecutQuery("logIn", param);
            Dal.Close();
            return(dt);
        }