コード例 #1
0
        public void ADD_CONTIENT(string REF, int NO_FACTURE, int QUT_CD)
        {
            DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
            dal.open();

            SqlParameter[] param = new SqlParameter[3];

            param[0]       = new SqlParameter("@REF", SqlDbType.VarChar, 50);
            param[0].Value = REF;
            param[1]       = new SqlParameter("@NO_FACTURE", SqlDbType.Int);
            param[1].Value = NO_FACTURE;
            param[2]       = new SqlParameter("@QUT_CD", SqlDbType.Int);
            param[2].Value = QUT_CD;

            dal.ExecutCommand("ADD_CONTIENT", param);
            dal.close();
        }
コード例 #2
0
        public void ADD_ARTICLE(string REF, string DESIGNATION, decimal PU, int QS)
        {
            DAL.DataAccessLayer dal   = new DAL.DataAccessLayer();
            SqlParameter[]      param = new SqlParameter[4];
            dal.open();

            param[0]       = new SqlParameter("@REF", SqlDbType.VarChar, 50);
            param[0].Value = REF;
            param[1]       = new SqlParameter("@DESIGNATION", SqlDbType.VarChar, 50);
            param[1].Value = DESIGNATION;
            param[2]       = new SqlParameter("@PU", SqlDbType.Float);
            param[2].Value = PU;
            param[3]       = new SqlParameter("@QUT_ST", SqlDbType.Int);
            param[3].Value = QS;

            dal.ExecutCommand("ADD_ARTICLE", param);
            dal.close();
        }
コード例 #3
0
        public void UPDATE_USER(string USERNAME, string NAME, string PSW, string USERTYPE)
        {
            DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
            dal.Open();
            SqlParameter[] param = new SqlParameter[4];
            param[0]       = new SqlParameter("@USERNAME", SqlDbType.VarChar, 50);
            param[0].Value = USERNAME;

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

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

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

            dal.ExecutCommand("UPDATE_USER", param);
            dal.Close();
        }
コード例 #4
0
        public void ADD_CLIENT(int Code_cl, string nom, string adresse, string ville, decimal solde)
        {
            DAL.DataAccessLayer dal   = new DAL.DataAccessLayer();
            SqlParameter[]      param = new SqlParameter[5];
            dal.open();

            param[0]       = new SqlParameter("@CODE_CL", SqlDbType.Int);
            param[0].Value = Code_cl;
            param[1]       = new SqlParameter("@NOM_CL", SqlDbType.VarChar, 25);
            param[1].Value = nom;
            param[2]       = new SqlParameter("@ADRESSE", SqlDbType.VarChar, 50);
            param[2].Value = adresse;
            param[3]       = new SqlParameter("@VILLE", SqlDbType.VarChar, 50);
            param[3].Value = ville;
            param[4]       = new SqlParameter("@SOLDE", SqlDbType.Money);
            param[4].Value = solde;

            dal.ExecutCommand("ADD_CLIENT", param);
            dal.close();
        }
コード例 #5
0
        public void ADD_FACTURE(int NO_FACTURE, DateTime DATE_FACTURE, decimal MONTANT_FACTURE, decimal MONTANT_RESTE, int CODE_CL)
        {
            DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
            dal.open();

            SqlParameter[] param = new SqlParameter[5];

            param[0]       = new SqlParameter("@NO_FACTURE", SqlDbType.Int);
            param[0].Value = NO_FACTURE;
            param[1]       = new SqlParameter("@DATE_FACTURE", SqlDbType.Date);
            param[1].Value = DATE_FACTURE;
            param[2]       = new SqlParameter("@MONTANT_FACTURE", SqlDbType.Money);
            param[2].Value = MONTANT_FACTURE;
            param[3]       = new SqlParameter("@MONTANT_RESTE", SqlDbType.Money);
            param[3].Value = MONTANT_RESTE;
            param[4]       = new SqlParameter("@CODE_CL", SqlDbType.Int);
            param[4].Value = CODE_CL;

            dal.ExecutCommand("ADD_FACTURE", param);
            dal.close();
        }