Beispiel #1
0
        public bool Update(Organization objOrganization)
        {
            int recAffected = 0;

            DBConnectionString.Organization organization = new DBConnectionString.Organization();
            organization.OrganizationId      = objOrganization.OrganizationId;
            organization.Address1            = objOrganization.Address1;
            organization.Address2            = objOrganization.Address2;
            organization.City                = objOrganization.City;
            organization.CountryId           = objOrganization.CountryId;
            organization.CreatedBy           = objOrganization.CreatedBy;
            organization.CreatedDate         = objOrganization.CreatedDate;
            organization.Email               = objOrganization.Email;
            organization.OrganizationDesc    = objOrganization.OrganizationDesc;
            organization.OrganizationName    = objOrganization.OrganizationName;
            organization.OrganizationTypeId  = objOrganization.OrganizationTypeId;
            organization.Phone1              = objOrganization.Phone1;
            organization.Phone2              = objOrganization.Phone2;
            organization.RegisterationNumber = objOrganization.RegisterationNumber;
            organization.StateId             = objOrganization.StateId;
            organization.ModifiedBy          = objOrganization.ModifiedBy;
            organization.ModifiedDate        = DateTime.Now;
            recAffected = Convert.ToInt32(organization.Insert());
            if (recAffected > 0)
            {
                return(true);
            }
            return(false);
        }
 public bool Create(Organization objOrganization)
 {
     int recAffected = 0;
     DBConnectionString.Organization organization = new DBConnectionString.Organization();
     organization.Address1 = objOrganization.Address1;
     organization.Address2 = objOrganization.Address2;
     organization.City = objOrganization.City;
     organization.CountryId = objOrganization.CountryId;
     organization.CreatedBy = objOrganization.CreatedBy;
     organization.CreatedDate = DateTime.Now;
     organization.Email = objOrganization.Email;
     organization.OrganizationDesc = objOrganization.OrganizationDesc;
     organization.OrganizationName = objOrganization.OrganizationName;
     organization.OrganizationTypeId = objOrganization.OrganizationTypeId;
     organization.Phone1 = objOrganization.Phone1;
     organization.Phone2 = objOrganization.Phone2;
     organization.RegisterationNumber = objOrganization.RegisterationNumber;
     organization.StateId = objOrganization.StateId;
     recAffected = Convert.ToInt32(organization.Insert());
     if (recAffected > 0)
     {
         return true;
     }
     return false;
 }
Beispiel #3
0
 public string Edit(DBConnectionString.Organization organization, string token)
 {
     try
     {
         if (ModelState.IsValid)
         {
             organization.ModifiedBy   = _userStatistics.UserId;
             organization.ModifiedDate = DateTime.Now;
             if (organization.Update() > 0)
             {
                 SaveFiles(token, this.GetType().Name, organization.OrganizationId);
                 return(Convert.ToString(true));
             }
             return(Convert.ToString(false));
         }
         return(Convert.ToString(false));
     }
     catch (Exception ex)
     {
         return(ex.Message.ToString());
     }
 }