)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Default (Ia.Wa.Models.Business)

Public general use code classes and xml files that we've compiled and used over the years:

    1: using System;
    2: using System.Configuration;
    3: using System.Data;
    4: using Ia.Cl;
    5:  
    6: namespace Ia.Wa.Models.Business
    7: {
    8:     ////////////////////////////////////////////////////////////////////////////
    9:  
   10:     /// <summary publish="true">
   11:     ///
   12:     /// </summary>
   13:     /// 
   14:     /// <remarks> 
   15:     /// Copyright © 2006-2025 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   16:     ///
   17:     /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
   18:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   19:     ///
   20:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   21:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   22:     /// 
   23:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   24:     /// 
   25:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   26:     /// </remarks> 
   27:     public class Default
   28:     {
   29:         ////////////////////////////////////////////////////////////////////////////
   30:  
   31:         /// <summary>
   32:         ///
   33:         /// </summary>
   34:         public Default()
   35:         {
   36:         }
   37:  
   38:         ////////////////////////////////////////////////////////////////////////////
   39:  
   40:         /// <summary>
   41:         ///
   42:         /// </summary>
   43:         public static DataTable ReturnListOfDroppingDomainsWithinNextDays()
   44:         {
   45:             var connectionString = Ia.Cl.Models.ApplicationConfiguration.GetSetting("ConnectionStrings:DefaultConnection");
   46:  
   47:             var sqlserver = string.Empty; // new IaDbContext.SqlServer(connectionString);
   48:  
   49:             //var dt = sqlserver.Select("select Name,[Drop] from [Ia_Simple].[dbo].[Domains] where [Drop] >= '" + sqlserver.SmallDateTime(DateTime.UtcNow.AddHours(3)) + "' order by [Drop] desc");
   50:             //dt = sqlserver.Select("select Name,[Drop] from [Ia_Simple].[dbo].[Domains] where [Drop] >= '2015-01-01' order by [Drop] desc");
   51:  
   52:             return null;// dt;
   53:         }
   54:  
   55:         ////////////////////////////////////////////////////////////////////////////
   56:  
   57:         /// <summary>
   58:         ///
   59:         /// </summary>
   60:         public static string Registration_Email(string email, string password)
   61:         {
   62:             string result;
   63:  
   64:             var message = Ia.Wa.Models.Ui.Default.MailTop();
   65:  
   66:             message += @"
   67: <p>You new account is ready:</p>
   68: <table>
   69: <tr><td>Email:</td><td style=""font-weight:bold"">" + email + @"</td></tr>
   70: <tr><td>Password:</td><td style=""font-weight:bold"">" + password + @"</td></tr>
   71: </table>
   72: ";
   73:  
   74:             message += "<p>We wish you a good experience with our service</p>";
   75:  
   76:             message += Ia.Wa.Models.Ui.Default.MailBottom();
   77:  
   78:             var r = Ia.Cl.Models.Smtp.SendHtml(email, email, "Your New " + Ia.Cl.Models.ApplicationConfiguration.GetSetting("AppSettings:SiteName") + " Account is Ready", message);//, out result);
   79:  
   80:             if (r.IsSuccessful) result = "Confirmation email was sent to your '" + email + "' mailbox. ";
   81:             else result = "Could not send email with new password. ";
   82:  
   83:             return result;
   84:         }
   85:  
   86:         ////////////////////////////////////////////////////////////////////////////
   87:  
   88:         /// <summary>
   89:         ///
   90:         /// </summary>
   91:         public static string SendRegistrationConfirmationEmail(object providerUserKey, string email, string password)
   92:         {
   93:             string result;
   94:  
   95:             var message = Ia.Wa.Models.Ui.Default.PlainMailTop();
   96:  
   97:             message += @"
   98: Please confirm your account by clicking on the link: <a href=""http://fkim.com/private/verify_registration.aspx?id=" + providerUserKey.ToString() + @"""/>
   99: Email: " + email + @"
  100: Password: " + password + @"
  101:  
  102: We wish you a good experience with our service.
  103: ";
  104:  
  105:             message += Ia.Wa.Models.Ui.Default.PlainMailBottom();
  106:  
  107:             var r = Ia.Cl.Models.Smtp.SendPlain(email, email, "Your New " + Ia.Cl.Models.ApplicationConfiguration.GetSetting("AppSettings:SiteName") + " Account is Ready", message);//, out result);
  108:  
  109:             if (r.IsSuccessful) result = "Confirmation email was sent to your '" + email + "' mailbox. ";
  110:             else result = "Could not send email with new password. ";
  111:  
  112:             return result;
  113:         }
  114:  
  115:         ////////////////////////////////////////////////////////////////////////////
  116:         ////////////////////////////////////////////////////////////////////////////
  117:     }
  118:  
  119:     ////////////////////////////////////////////////////////////////////////////
  120:     ////////////////////////////////////////////////////////////////////////////
  121: }