)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Skip Navigation Links

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

Default support class for Next Generation Network (NGN) web application (Intranet) model.

    1: using System;
    2: using System.Web;
    3: using System.Xml;
    4: using System.Xml.Linq;
    5: using System.IO;
    6: using System.Configuration;
    7: using System.Text;
    8: using System.Text.RegularExpressions;
    9: using System.Data;
   10: using System.Data.SqlClient;
   11: using System.Web.UI;
   12: using System.Web.UI.WebControls;
   13: using System.Collections;
   14: using System.Collections.Generic;
   15: using System.Linq;
   16: using System.Web.Security;
   17:  
   18: namespace Ia.TentPlay.Wa.Model.Ui
   19: {
   20:     ////////////////////////////////////////////////////////////////////////////
   21:  
   22:     /// <summary publish="true">
   23:     /// Default support class for Next Generation Network (NGN) web application (Intranet) model.
   24:     /// </summary>
   25:     /// 
   26:     /// <remarks> 
   27:     /// Copyright © 2006-2015 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   28:     ///
   29:     /// 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
   30:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   31:     ///
   32:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   33:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   34:     /// 
   35:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   36:     /// 
   37:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   38:     /// </remarks> 
   39:     public partial class Default
   40:     {
   41:         ////////////////////////////////////////////////////////////////////////////
   42:  
   43:         /// <summary>
   44:         ///
   45:         /// </summary>
   46:         public static void Theme(System.Web.UI.Page page, System.Web.Profile.ProfileBase profile)
   47:         {
   48:             // below: use mobile master pages if this browser is mobile
   49:             if (HttpContext.Current.Request.Browser.IsMobileDevice)
   50:             {
   51:                 page.MasterPageFile = page.MasterPageFile.Replace("/", "/m/");
   52:                 page.Theme = "default.m";
   53:             }
   54:             else page.Theme = "default";
   55:         }
   56:  
   57:         ////////////////////////////////////////////////////////////////////////////
   58:  
   59:         /// <summary>
   60:         ///
   61:         /// </summary>
   62:         public static void GridView_RowDataBound(System.Web.UI.Page page, object sender, GridViewRowEventArgs e)
   63:         {
   64:             bool senderKnown, state;
   65:             int j, areaId;
   66:             string s, senderId;
   67:             Guid userId, _userId;
   68:  
   69:             areaId = 0;
   70:             userId = Guid.Empty;
   71:             senderId = e.Row.Parent.Parent.ID;
   72:  
   73:             if (e.Row.RowType == DataControlRowType.Header || e.Row.RowType == DataControlRowType.Footer || e.Row.RowType == DataControlRowType.DataRow)
   74:             {
   75:                 if (e.Row.RowType == DataControlRowType.Header)
   76:                 {
   77:                 }
   78:                 else if (e.Row.RowType == DataControlRowType.DataRow)
   79:                 {
   80:                     //DataRowView drv = (DataRowView)e.Row.DataItem;
   81:  
   82:                     foreach (Control control in e.Row.Controls)
   83:                     {
   84:                         try
   85:                         {
   86:                             if (control.Controls.Count > 0)
   87:                             {
   88:                                 if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.Label")
   89:                                 {
   90:                                     Label l = (Label)control.Controls[0];
   91:  
   92:                                     switch (l.ID)
   93:                                     {
   94:                                         default: break;
   95:                                     }
   96:                                 }
   97:                                 else if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.TextBox")
   98:                                 {
   99:                                     TextBox tb = (TextBox)control.Controls[0];
  100:  
  101:                                     switch (tb.ID)
  102:                                     {
  103:                                         default: break;
  104:                                     }
  105:                                 }
  106:                             }
  107:                         }
  108:                         catch (Exception)
  109:                         {
  110:                         }
  111:                     }
  112:                 }
  113:                 else if (e.Row.RowType == DataControlRowType.Footer)
  114:                 {
  115:                 }
  116:                 else
  117:                 {
  118:                 }
  119:             }
  120:             else
  121:             {
  122:             }
  123:         }
  124:  
  125:         ////////////////////////////////////////////////////////////////////////////
  126:         ////////////////////////////////////////////////////////////////////////////
  127:     }
  128:  
  129:     ////////////////////////////////////////////////////////////////////////////
  130:     ////////////////////////////////////////////////////////////////////////////   
  131: }