public WebResponce SaveEmployees(EmployeeVM files)
 {
     try
     {
         Employee employe = JsonConvert.DeserializeObject <Employee>(files.Employee);
         if (files.file != null)
         {
             using (var ms = new MemoryStream())
             {
                 files.file.CopyTo(ms);
                 var fileBytes = ms.ToArray();
                 employe.Image = fileBytes;
             }
         }
         employe.CreatedBy = Crypto.DecryptString(Request.Cookies["jkfitness.cookie"]);
         webResponce       = employee.SaveEmployees(employe);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
 public ActionResult <WebResponce> ValidateLogIn([FromBody] Employee employe)
 {
     webResponce = logInService.ListLogInInfo(employe);
     if (webResponce.Code == 1)
     {
         Response.Cookies.Append("jkfitness.cookie", Crypto.EncryptString(((Employee)webResponce.Data).EmployeeId));
     }
     return(webResponce);
 }
Beispiel #3
0
 public WebResponce GetBranchById([FromBody] Branch branch)
 {
     try
     {
         webResponce = Setting.GetBranchById(branch.Id);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
Beispiel #4
0
 public WebResponce GetBranchDetails()
 {
     try
     {
         webResponce = Setting.ListBranchDetails();
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
Beispiel #5
0
 public WebResponce SearchMembershipType([FromBody] MembershipTypes membershipType)
 {
     try
     {
         webResponce = Setting.SearchMembershipType(membershipType);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
Beispiel #6
0
 public WebResponce GetMembershipTypeById([FromBody] MembershipTypes membershipType)
 {
     try
     {
         webResponce = Setting.GetMembershipTypeById(membershipType.Id);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
Beispiel #7
0
 public WebResponce GetMembershipTypeDetails()
 {
     try
     {
         webResponce = Setting.ListMembershipTypesDetails();
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
Beispiel #8
0
 public WebResponce SearchExpensesType([FromBody] ExpensesTypes expenseType)
 {
     try
     {
         webResponce = Setting.SearchExpenseTypes(expenseType);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
Beispiel #9
0
 public WebResponce GetExpenseTypeById([FromBody] ExpensesTypes expenseType)
 {
     try
     {
         webResponce = Setting.GetExpenseTypeById(expenseType.Id);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
 public WebResponce GetEmployeeById([FromBody] Employee employe)
 {
     try
     {
         webResponce = employee.GetEmployeeById(employe.EmployeeId);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
Beispiel #11
0
 public WebResponce SearchBranch([FromBody] Branch branch)
 {
     try
     {
         webResponce = Setting.SearchBranch(branch);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
 public WebResponce GetMemberDetails()
 {
     try
     {
         webResponce = MemberShip.ListMemberShipDetails();
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
 public WebResponce GetMemberShipById([FromBody] MemberShip Member)
 {
     try
     {
         webResponce = MemberShip.GetMemberShipDetailsById(Member.MemberId);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
 public WebResponce GetUserTypeDetails()
 {
     try
     {
         webResponce = employee.ListUserType();
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
 public WebResponce SearchMembers([FromBody] MemberShip member)
 {
     try
     {
         webResponce = MemberShip.SearchMemberShipDetails(member);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
 public WebResponce SearchEmployees([FromBody] Employee employe)
 {
     try
     {
         webResponce = employee.SearchEmployee(employe);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
 public WebResponce UpdateMemberShip(MemberShip Member)
 {
     try
     {
         Member.ModifiedBy = Crypto.DecryptString(Request.Cookies["jkfitness.cookie"]);
         webResponce       = MemberShip.UpdateMemberShipDetails(Member);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
Beispiel #18
0
 public WebResponce UpdateMembershipType([FromBody] MembershipTypes membershipType)
 {
     try
     {
         membershipType.ModifiedBy = Crypto.DecryptString(Request.Cookies["jkfitness.cookie"]);
         webResponce = Setting.UpdateMembershipType(membershipType);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
Beispiel #19
0
 public WebResponce Updatebranch([FromBody] Branch branch)
 {
     try
     {
         branch.ModifiedBy = Crypto.DecryptString(Request.Cookies["jkfitness.cookie"]);
         webResponce       = Setting.UpdateBranch(branch);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
Beispiel #20
0
 public WebResponce SaveExpensesType([FromBody] ExpensesTypes expenseType)
 {
     try
     {
         expenseType.CreatedBy = Crypto.DecryptString(Request.Cookies["jkfitness.cookie"]);
         webResponce           = Setting.SaveExpensesType(expenseType);
         return(webResponce);
     }
     catch (Exception Ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = Ex.Message
         };
         return(webResponce);
     }
 }
 public ActionResult <WebResponce> SignOutLogin()
 {
     try
     {
         Response.Cookies.Delete("jkfitness.cookie");
         webResponce = new WebResponce()
         {
             Code    = 1,
             Message = "Success"
         };
         return(webResponce);
     }
     catch (Exception ex)
     {
         webResponce = new WebResponce()
         {
             Code    = -1,
             Message = ex.Message.ToString()
         };
         return(webResponce);
     }
 }
 public ActionResult <WebResponce> UpdatePassword([FromBody] Employee employe)
 {
     employe.ModifiedBy = Crypto.DecryptString(Request.Cookies["jkfitness.cookie"]);
     webResponce        = logInService.UpdatePassword(employe);
     return(webResponce);
 }
 public ActionResult <WebResponce> ConfirmPassword([FromBody] Employee employe)
 {
     webResponce = logInService.ConfirmPassword(employe);
     return(webResponce);
 }