示例#1
0
        /// <summary>
        /// Check and Create or Update Sender information
        /// </summary>
        /// <param name="senderInfoObj"></param>
        /// <param name="isSender"></param>
        public void CheckAndUpdateSender(SenderInfo senderInfoObj, bool isSender)
        {
            string SqlQuery = string.Empty;

            if (this.ISSenderExist(isSender))
            {
                //-- UPDATE
                SqlQuery = DevInfo.Lib.DI_LibDAL.Queries.SDMXUser.Update.UpdateSender(this.DBQueries.TablesName.SDMXUser, isSender, DICommon.RemoveQuotes(senderInfoObj.ID), DICommon.RemoveQuotes(senderInfoObj.SenderName), DICommon.RemoveQuotes(senderInfoObj.ContactName), DICommon.RemoveQuotes(senderInfoObj.Role), DICommon.RemoveQuotes(senderInfoObj.Department), DICommon.RemoveQuotes(senderInfoObj.Telephone), DICommon.RemoveQuotes(senderInfoObj.Email), DICommon.RemoveQuotes(senderInfoObj.Fax));

                this.DBConnection.ExecuteNonQuery(SqlQuery);
            }
            else
            {
                //-- INSERT
                SqlQuery = DevInfo.Lib.DI_LibDAL.Queries.SDMXUser.Insert.InsertSender(this.DBQueries.TablesName.SDMXUser, isSender, DICommon.RemoveQuotes(senderInfoObj.ID), DICommon.RemoveQuotes(senderInfoObj.SenderName), DICommon.RemoveQuotes(senderInfoObj.ContactName), DICommon.RemoveQuotes(senderInfoObj.Role), DICommon.RemoveQuotes(senderInfoObj.Department), DICommon.RemoveQuotes(senderInfoObj.Telephone), DICommon.RemoveQuotes(senderInfoObj.Email), DICommon.RemoveQuotes(senderInfoObj.Fax));

                this.DBConnection.ExecuteNonQuery(SqlQuery);
            }
        }
示例#2
0
        /// <summary>
        /// Check and Create or Update Sender information
        /// </summary>
        /// <param name="senderInfoObj"></param>
        /// <param name="isSender"></param>
        public void CheckAndUpdateSender(SenderInfo senderInfoObj, bool isSender)
        {
            string SqlQuery = string.Empty;

            if (this.ISSenderExist(isSender))
            {
                //-- UPDATE
                SqlQuery = DevInfo.Lib.DI_LibDAL.Queries.SDMXUser.Update.UpdateSender(this.DBQueries.TablesName.SDMXUser, isSender, DICommon.RemoveQuotes(senderInfoObj.ID), DICommon.RemoveQuotes(senderInfoObj.SenderName), DICommon.RemoveQuotes(senderInfoObj.ContactName), DICommon.RemoveQuotes(senderInfoObj.Role), DICommon.RemoveQuotes(senderInfoObj.Department), DICommon.RemoveQuotes(senderInfoObj.Telephone), DICommon.RemoveQuotes(senderInfoObj.Email), DICommon.RemoveQuotes(senderInfoObj.Fax));

                this.DBConnection.ExecuteNonQuery(SqlQuery);
            }
            else
            {
                //-- INSERT
                SqlQuery = DevInfo.Lib.DI_LibDAL.Queries.SDMXUser.Insert.InsertSender(this.DBQueries.TablesName.SDMXUser, isSender, DICommon.RemoveQuotes(senderInfoObj.ID), DICommon.RemoveQuotes(senderInfoObj.SenderName), DICommon.RemoveQuotes(senderInfoObj.ContactName), DICommon.RemoveQuotes(senderInfoObj.Role), DICommon.RemoveQuotes(senderInfoObj.Department), DICommon.RemoveQuotes(senderInfoObj.Telephone), DICommon.RemoveQuotes(senderInfoObj.Email), DICommon.RemoveQuotes(senderInfoObj.Fax));

                this.DBConnection.ExecuteNonQuery(SqlQuery);
            }
        }
示例#3
0
        /// <summary>
        /// Get Sender Information (True for Sender and False for Receiver)       
        /// </summary>
        /// <param name="isSender">True for Sender and False for Receiver</param>
        /// <returns></returns>
        public SenderInfo GetSenderInfo(bool isSender)
        {
            SenderInfo RetVal = new SenderInfo();

            DataTable Table = null;
            Table = this.DBConnection.ExecuteDataTable(this.DBQueries.SDMXUser.GetSender(isSender));

            if (Table.Rows.Count > 0)
            {
                RetVal.ID = Convert.ToString(Table.Rows[0][SDMXUser.ID]);
                RetVal.SenderName = Convert.ToString(Table.Rows[0][SDMXUser.Name]);
                RetVal.ContactName = Convert.ToString(Table.Rows[0][SDMXUser.ContactName]);
                RetVal.Department = Convert.ToString(Table.Rows[0][SDMXUser.Department]);
                RetVal.Role = Convert.ToString(Table.Rows[0][SDMXUser.Role]);
                RetVal.Telephone = Convert.ToString(Table.Rows[0][SDMXUser.Telephone]);
                RetVal.Fax = Convert.ToString(Table.Rows[0][SDMXUser.Fax]);
                RetVal.Email = Convert.ToString(Table.Rows[0][SDMXUser.Email]);
            }

            return RetVal;
        }
示例#4
0
        /// <summary>
        /// Get Sender Information (True for Sender and False for Receiver)
        /// </summary>
        /// <param name="isSender">True for Sender and False for Receiver</param>
        /// <returns></returns>
        public SenderInfo GetSenderInfo(bool isSender)
        {
            SenderInfo RetVal = new SenderInfo();

            DataTable Table = null;

            Table = this.DBConnection.ExecuteDataTable(this.DBQueries.SDMXUser.GetSender(isSender));

            if (Table.Rows.Count > 0)
            {
                RetVal.ID          = Convert.ToString(Table.Rows[0][SDMXUser.ID]);
                RetVal.SenderName  = Convert.ToString(Table.Rows[0][SDMXUser.Name]);
                RetVal.ContactName = Convert.ToString(Table.Rows[0][SDMXUser.ContactName]);
                RetVal.Department  = Convert.ToString(Table.Rows[0][SDMXUser.Department]);
                RetVal.Role        = Convert.ToString(Table.Rows[0][SDMXUser.Role]);
                RetVal.Telephone   = Convert.ToString(Table.Rows[0][SDMXUser.Telephone]);
                RetVal.Fax         = Convert.ToString(Table.Rows[0][SDMXUser.Fax]);
                RetVal.Email       = Convert.ToString(Table.Rows[0][SDMXUser.Email]);
            }

            return(RetVal);
        }