Esempio n. 1
0
        private void afficheTypeCommission(string typeCommissionStr)
        {
            #region declaration
            crlTypeCommssion typeCommission = null;
            string           strConfirm     = "";
            #endregion

            #region implementation
            if (typeCommissionStr != "")
            {
                typeCommission = serviceTypeCommission.selectTypeCommission(typeCommissionStr);

                if (typeCommission != null)
                {
                    TextCommentaireTypeCommission.Text = typeCommission.CommentaireTypeCommission;
                    TextTypeCommission.Text            = typeCommission.TypeCommission;

                    hfTypeCommission.Value = typeCommission.TypeCommission;

                    btnModifier.Enabled = true;
                    btnValider.Enabled  = false;

                    strConfirm = "Voulez vous vraiment modifier le type commission " + typeCommission.TypeCommission + "?";
                    btnModifier_ConfirmButtonExtender.ConfirmText = strConfirm;
                }
            }
            #endregion
        }
Esempio n. 2
0
        string IntfDalTypeCommission.insertTypeCommission(crlTypeCommssion typeCommission)
        {
            #region declaration
            string typeCommissionStr = "";
            int    nbInsert          = 0;
            #endregion

            #region implementation
            if (typeCommission != null)
            {
                this.strCommande  = "INSERT INTO `typecommission` (`typeCommission`,`commentaireTypeCommission`)";
                this.strCommande += " VALUES ('" + typeCommission.TypeCommission + "','" + typeCommission.CommentaireTypeCommission + "')";

                this.serviceConnection.openConnection();
                nbInsert = this.serviceConnection.requete(this.strCommande);
                if (nbInsert == 1)
                {
                    typeCommissionStr = typeCommission.TypeCommission;
                }
                this.serviceConnection.closeConnection();
            }
            #endregion

            return(typeCommissionStr);
        }
Esempio n. 3
0
        protected void btnValider_Click(object sender, EventArgs e)
        {
            #region declaration
            crlTypeCommssion typeCommission    = null;
            string           typeCommissionStr = "";
            #endregion

            #region implementation
            typeCommission = new crlTypeCommssion();
            this.insertToObjTypeCommission(typeCommission);

            typeCommissionStr = serviceTypeCommission.isTypeCommission(typeCommission, typeCommission.TypeCommission);

            if (typeCommissionStr.Equals(""))
            {
                typeCommissionStr = serviceTypeCommission.insertTypeCommission(typeCommission);

                if (typeCommissionStr != "")
                {
                    this.initialiseGridTypeCommission();
                }
                else
                {
                    //
                }
            }
            else
            {
                //deja dans la base
                this.afficheTypeCommission(typeCommissionStr);
            }
            #endregion
        }
Esempio n. 4
0
        crlTypeCommssion IntfDalTypeCommission.selectTypeCommission(string typeCommissionStr)
        {
            #region declaration
            crlTypeCommssion typeCommission = null;
            #endregion

            #region implementation
            if (typeCommissionStr != "")
            {
                this.strCommande  = "SELECT * FROM `typecommission`";
                this.strCommande += " WHERE `typeCommission`='" + typeCommissionStr + "'";

                this.serviceConnection.openConnection();
                this.reader = this.serviceConnection.select(this.strCommande);
                if (this.reader != null)
                {
                    if (this.reader.HasRows)
                    {
                        typeCommission = new crlTypeCommssion();
                        if (this.reader.Read())
                        {
                            typeCommission.TypeCommission            = this.reader["typeCommission"].ToString();
                            typeCommission.CommentaireTypeCommission = this.reader["commentaireTypeCommission"].ToString();
                        }
                    }
                    this.reader.Dispose();
                }
                this.serviceConnection.closeConnection();
            }
            #endregion

            return(typeCommission);
        }
Esempio n. 5
0
        string IntfDalTypeCommission.isTypeCommission(crlTypeCommssion typeCommission, string typeCommissionStr)
        {
            #region declaration
            string typeComimssionStr = "";
            #endregion

            #region implementation
            if (typeCommission != null)
            {
                this.strCommande  = "SELECT * FROM `typecommission`";
                this.strCommande += " WHERE `typeCommission`<>'" + typeCommissionStr + "' AND";
                this.strCommande += " `typeCommission`='" + typeCommission.TypeCommission + "'";

                this.serviceConnection.openConnection();
                this.reader = this.serviceConnection.select(this.strCommande);
                if (this.reader != null)
                {
                    if (this.reader.HasRows)
                    {
                        if (this.reader.Read())
                        {
                            typeComimssionStr = this.reader["typeCommission"].ToString();
                        }
                    }
                    this.reader.Dispose();
                }
                this.serviceConnection.closeConnection();
            }
            #endregion

            return(typeComimssionStr);
        }
Esempio n. 6
0
        bool IntfDalTypeCommission.updateTypeCommission(crlTypeCommssion typeCommission, string typeCommissionStr)
        {
            #region declaration
            bool isUpDate = false;
            int  nbUpdate = 0;
            #endregion

            #region implementation
            if (typeCommission != null)
            {
                this.strCommande  = "UPDATE `typecommission` SET `typeCommission`='" + typeCommission.TypeCommission + "',";
                this.strCommande += " `commentaireTypeCommission`='" + typeCommission.CommentaireTypeCommission + "'";
                this.strCommande += " WHERE `typeCommission`='" + typeCommissionStr + "'";

                this.serviceConnection.openConnection();
                nbUpdate = this.serviceConnection.requete(this.strCommande);
                if (nbUpdate == 1)
                {
                    isUpDate = true;
                }
                this.serviceConnection.closeConnection();
            }
            #endregion

            return(isUpDate);
        }
Esempio n. 7
0
 public crlDesignationCommission()
 {
     this.Designation      = "";
     this.NumDesignation   = "";
     this.TypeCommission   = "";
     this.Paiement         = 0;
     this.typeCommssionObj = null;
 }
Esempio n. 8
0
 private void insertToObjTypeCommission(crlTypeCommssion typeCommission)
 {
     #region implementation
     if (typeCommission != null)
     {
         typeCommission.TypeCommission            = TextTypeCommission.Text;
         typeCommission.CommentaireTypeCommission = TextCommentaireTypeCommission.Text;
     }
     #endregion
 }
Esempio n. 9
0
        public crlCommissionDevis()
        {
            this.IdCommissionDevis = "";
            this.Destination       = "";
            this.FraisEnvoi        = 0;
            this.PieceJustificatif = "";
            this.Poids             = 0;
            this.Nombre            = 0;
            this.NumDesignation    = "";
            this.NumTrajet         = "";
            this.TypeCommission    = "";
            this.NumProforma       = "";
            this.NumExpediteur     = "";
            this.NumRecepteur      = "";

            this.trajet                = null;
            this.typeCommssionObjet    = null;
            this.designationCommission = null;
            this.expediteur            = null;
            this.recepteur             = null;
        }
Esempio n. 10
0
        protected void btnModifier_Click(object sender, EventArgs e)
        {
            #region declaration
            crlTypeCommssion typeCommission    = null;
            string           typeCommissionStr = "";
            #endregion

            #region implementation
            if (hfTypeCommission.Value != "")
            {
                typeCommission = serviceTypeCommission.selectTypeCommission(hfTypeCommission.Value);

                if (typeCommission != null)
                {
                    this.insertToObjTypeCommission(typeCommission);

                    typeCommissionStr = serviceTypeCommission.isTypeCommission(typeCommission, hfTypeCommission.Value);

                    if (typeCommissionStr.Equals(""))
                    {
                        if (serviceTypeCommission.updateTypeCommission(typeCommission, hfTypeCommission.Value))
                        {
                            this.initialiseGridTypeCommission();
                        }
                        else
                        {
                            //
                        }
                    }
                    else
                    {
                        //deja dans la base
                    }
                }
            }
            #endregion
        }