partial void Deletetbl_Companies(tbl_Companies instance);
 partial void Updatetbl_Companies(tbl_Companies instance);
 partial void Inserttbl_Companies(tbl_Companies instance);
		private void detach_tbl_Companies(tbl_Companies entity)
		{
			this.SendPropertyChanging();
			entity.tbl_Status = null;
		}
Exemple #5
0
 private void AssignDataObjectToEntity(tbl_Companies dbCompany, ref Company entCompany)
 {
     entCompany.IdCompany = dbCompany.IdCompany;
     entCompany.Name = dbCompany.Name;
     entCompany.Description = dbCompany.Description;
     entCompany.EntStatus = new Status() {
         IdStatus= dbCompany.tbl_Status.IdStatus,
         Name= dbCompany.tbl_Status.Name};
 }
Exemple #6
0
 private bool Insert(Company entCompany)
 {
     TCRepositoryDataContext context = DataBaseUtils.GetContext();
     tbl_Companies dbCompany = new tbl_Companies() {
         Description = entCompany.Description,
         Name = entCompany.Name,
         IdStatus = entCompany.EntStatus.IdStatus
     };
     try
     {
         context.tbl_Companies.InsertOnSubmit(dbCompany);
         context.SubmitChanges();
         return true;
     }
     catch {
         return false;
     }
 }