示例#1
0
        public BL_Result <Personnel> PersonnelUpdate(string db_name, BL_Result <Personnel> per)
        {
            Repository <Personnel> repo_personnel = new Repository <Personnel>(db_name);
            Personnel personnel = repo_personnel.Find(x => x.Id == per.Result.Id);

            if (personnel != null)
            {
                personnel.Name                     = per.Result.Name;
                personnel.Surname                  = per.Result.Surname;
                personnel.City                     = per.Result.City;
                personnel.Birthday                 = per.Result.Birthday;
                personnel.Tc_No                    = per.Result.Tc_No;
                personnel.SGK_No                   = per.Result.SGK_No;
                personnel.MilitaryStatus           = per.Result.MilitaryStatus;
                personnel.MaritalStatus            = per.Result.MaritalStatus;
                personnel.Phone                    = per.Result.Phone;
                personnel.Vehicle                  = per.Result.Vehicle;
                personnel.VehicleRegistrationPlate = per.Result.VehicleRegistrationPlate;
                personnel.NameOfRelative           = per.Result.NameOfRelative;
                personnel.SurnameOfRelative        = per.Result.SurnameOfRelative;
                personnel.PhoneOfRelative          = per.Result.PhoneOfRelative;
                personnel.Address                  = per.Result.Address;
                personnel.Company                  = per.Result.Company;
                personnel.S_Central                = per.Result.S_Central;
                personnel.Chief                    = per.Result.Chief;
                personnel.Position                 = per.Result.Position;
                personnel.StartingDate             = per.Result.StartingDate;
                personnel.Salary                   = per.Result.Salary;
                personnel.English_speak            = per.Result.English_speak;
                personnel.English_write            = per.Result.English_write;
                personnel.English_read             = per.Result.English_read;
                personnel.German_speak             = per.Result.German_speak;
                personnel.German_write             = per.Result.German_write;
                personnel.German_read              = per.Result.German_read;
                personnel.French_speak             = per.Result.French_speak;
                personnel.French_write             = per.Result.French_write;
                personnel.French_read              = per.Result.French_read;
                personnel.OtherLanguage            = per.Result.OtherLanguage;
                personnel.SchoolName               = per.Result.SchoolName;
                personnel.Section                  = per.Result.Section;
                personnel.SchoolGraduation         = per.Result.SchoolGraduation;
                personnel.Grade                    = per.Result.Grade;
                personnel.DiseaseState             = per.Result.DiseaseState;
                personnel.HealthSituation          = per.Result.HealthSituation;
                personnel.DrivingLicense           = per.Result.DrivingLicense;
                personnel.Shift                    = per.Result.Shift;
                personnel.Smoke                    = per.Result.Smoke;
                personnel.Alcohol                  = per.Result.Alcohol;
                personnel.ProfileImage             = per.Result.ProfileImage;
                personnel.CurrencyUnit             = per.Result.CurrencyUnit;
            }
            repo_personnel.Update(personnel);
            return(result_personnel);
        }
示例#2
0
        public BL_Result <CompanyGroup> CompanyGroupUpdate(string db_name, BL_Result <CompanyGroup> updatedCompanyGroup)   //tedarikci guncelleniyor.
        {
            Repository <CompanyGroup> repo_companyGroup = new Repository <CompanyGroup>(db_name);
            CompanyGroup companyGroup = repo_companyGroup.Find(x => x.Id == updatedCompanyGroup.Result.Id);

            if (companyGroup != null)
            {
                companyGroup.Name         = updatedCompanyGroup.Result.Name;
                companyGroup.Confirmation = updatedCompanyGroup.Result.Confirmation;
            }
            repo_companyGroup.Update(companyGroup);
            return(result_companyGroup);
        }