Base solution for your next web application

Activities of "abu"

this is my .js file

(function () {
    var controllerId = 'logincontroller';
    angular.module('app').controller(controllerId, [
        '$scope', '$location', 'abp.services.practise.employee', function ($scope, $location, employeeService) {
            var vm = this;
            var localize = abp.localization.getSource('Practise');
            vm.logininfo = {};

            vm.employee = [];

          

            vm.logincheck = function () {

                employeeService.getEmployee(vm.logininfo).success(function (data) {
                    debugger;
                    alert("success");
                    vm.employee = data.employee
                    // $location.path('/dashboard');
                })
            };
        }]);
})();

this is my class file coding.

public GetEmployeesOutput GetEmployee(GetEmployeesInput input)
        {
            
                var userinfo = _userRepository.GetAll().Where(m => m.EmailID == input.Email && m.Password == input.Password).FirstOrDefault();

                var employee = _employeeRepository.GetAll().Where(p => p.UserId == userinfo.Id).FirstOrDefault();
                var employeedetail = _employeeRepository.Get(employee.Id);
               
                return new GetEmployeesOutput
                {
                    Employee = Mapper.Map<EmployeeDto>(employeedetail)
                };
                         
        }

this is my html page coding

<div ng-controller="logincontroller as vm">
        <div class="logobox">
            <table style="border-width:thick">
                <tr>
                    <th>firstname</th>
                    <th>lastname</th>
                </tr>
                <tr ng-repeat="emp in vm.employee">
                    <td><input id="Text1" type="text" ng-model="emp.firstName" /></td>
                    <td><input id="Text2" type="text" ng-model="emp.lastName" /></td>
                </tr>
            </table>
        </div>
</div>

no errors data is fetching on employee object visible in firefox debugger.

please reply sir.

how we store data in two different table with one table primary key set as foreign key on second table with one method call.

public void CreateUser(CreateUserInput input)
        {
          
            var userinfo = new User
            {
                EmailID = input.EmailID,
                Password = input.Password,
                DateTimeLastUpdated = DateTime.Now,
                DateTimeLastLogin = DateTime.Now,
                IsActive = 0,
                IsVerified = 0
            };

            userinfo.Id = _userRepository.InsertOrUpdateAndGetId(userinfo);
            uid = userinfo.Id;
            try
            {
                if (uid!= 0)
                {
                    var companyinfo = new CompanyProfile
                    {
                        UserId = uid,
                        CompanyName = input.CompanyName
                    };
                    _companyprofileRepository.Insert(companyinfo);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

getting internal error in this part

getting this error during update the database in package Manager Console

Introducing FOREIGN KEY constraint 'FK_dbo.Client_dbo.User_UpdatedByUserId' on table 'Client' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.

how we cascade ON Delete and OnUpdate

please help

how we make following error example:

  1. internal error
  2. your request is not valid. etc etc

in readable format to the user what the error is and where it present..???

please help

thank you

Showing 11 to 14 of 14 entries