예제 #1
0
 public List<MasterPageTemplate> GetAll()
 {
     MasterPageTemplateDAC _masterPageTemplateComponent = new MasterPageTemplateDAC();
      IDataReader reader =  _masterPageTemplateComponent.GetAllMasterPageTemplate().CreateDataReader();
      List<MasterPageTemplate> _masterPageTemplateList = new List<MasterPageTemplate>();
      while(reader.Read())
      {
      if(_masterPageTemplateList == null)
          _masterPageTemplateList = new List<MasterPageTemplate>();
          MasterPageTemplate _masterPageTemplate = new MasterPageTemplate();
          if(reader["MasterPageTemplateId"] != DBNull.Value)
              _masterPageTemplate.MasterPageTemplateId = Convert.ToInt32(reader["MasterPageTemplateId"]);
          if(reader["Name"] != DBNull.Value)
              _masterPageTemplate.Name = Convert.ToString(reader["Name"]);
          if(reader["Path"] != DBNull.Value)
              _masterPageTemplate.Path = Convert.ToString(reader["Path"]);
          if(reader["ClassName"] != DBNull.Value)
              _masterPageTemplate.ClassName = Convert.ToString(reader["ClassName"]);
          if(reader["MasterPageContent"] != DBNull.Value)
              _masterPageTemplate.MasterPageContent = Convert.ToString(reader["MasterPageContent"]);
      _masterPageTemplate.NewRecord = false;
      _masterPageTemplateList.Add(_masterPageTemplate);
      }             reader.Close();
      return _masterPageTemplateList;
 }
예제 #2
0
 public MasterPageTemplate GetByID(int _masterPageTemplateId)
 {
     MasterPageTemplateDAC _masterPageTemplateComponent = new MasterPageTemplateDAC();
      IDataReader reader = _masterPageTemplateComponent.GetByIDMasterPageTemplate(_masterPageTemplateId);
      MasterPageTemplate _masterPageTemplate = null;
      while(reader.Read())
      {
          _masterPageTemplate = new MasterPageTemplate();
          if(reader["MasterPageTemplateId"] != DBNull.Value)
              _masterPageTemplate.MasterPageTemplateId = Convert.ToInt32(reader["MasterPageTemplateId"]);
          if(reader["Name"] != DBNull.Value)
              _masterPageTemplate.Name = Convert.ToString(reader["Name"]);
          if(reader["Path"] != DBNull.Value)
              _masterPageTemplate.Path = Convert.ToString(reader["Path"]);
          if(reader["ClassName"] != DBNull.Value)
              _masterPageTemplate.ClassName = Convert.ToString(reader["ClassName"]);
          if(reader["MasterPageContent"] != DBNull.Value)
              _masterPageTemplate.MasterPageContent = Convert.ToString(reader["MasterPageContent"]);
      _masterPageTemplate.NewRecord = false;             }             reader.Close();
      return _masterPageTemplate;
 }
예제 #3
0
 public bool Insert( ref int MasterPageTemplateId,  string Name,  string Path,  string ClassName,  string MasterPageContent)
 {
     MasterPageTemplateDAC masterpagetemplateComponent = new MasterPageTemplateDAC();
     return masterpagetemplateComponent.InsertNewMasterPageTemplate( ref MasterPageTemplateId,  Name,  Path,  ClassName,  MasterPageContent);
 }
예제 #4
0
 public bool Insert(MasterPageTemplate masterpagetemplate)
 {
     int autonumber = 0;
     MasterPageTemplateDAC masterpagetemplateComponent = new MasterPageTemplateDAC();
     bool endedSuccessfuly = masterpagetemplateComponent.InsertNewMasterPageTemplate( ref autonumber,  masterpagetemplate.Name,  masterpagetemplate.Path,  masterpagetemplate.ClassName,  masterpagetemplate.MasterPageContent);
     if(endedSuccessfuly)
     {
         masterpagetemplate.MasterPageTemplateId = autonumber;
     }
     return endedSuccessfuly;
 }
예제 #5
0
 public void Delete(int Original_MasterPageTemplateId)
 {
     MasterPageTemplateDAC masterpagetemplateComponent = new MasterPageTemplateDAC();
     masterpagetemplateComponent.DeleteMasterPageTemplate(Original_MasterPageTemplateId);
 }
예제 #6
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     MasterPageTemplateDAC masterpagetemplatecomponent = new MasterPageTemplateDAC();
     return masterpagetemplatecomponent.UpdateDataset(dataset);
 }
예제 #7
0
 public bool Update( string Name,  string Path,  string ClassName,  string MasterPageContent,  int Original_MasterPageTemplateId)
 {
     MasterPageTemplateDAC masterpagetemplateComponent = new MasterPageTemplateDAC();
     return masterpagetemplateComponent.UpdateMasterPageTemplate( Name,  Path,  ClassName,  MasterPageContent,  Original_MasterPageTemplateId);
 }
예제 #8
0
 public bool Update(MasterPageTemplate masterpagetemplate ,int old_masterPageTemplateId)
 {
     MasterPageTemplateDAC masterpagetemplateComponent = new MasterPageTemplateDAC();
     return masterpagetemplateComponent.UpdateMasterPageTemplate( masterpagetemplate.Name,  masterpagetemplate.Path,  masterpagetemplate.ClassName,  masterpagetemplate.MasterPageContent,  old_masterPageTemplateId);
 }