public Groups[] GetJoinedGroups(string Id) { U_USR_GroupsDAL obj = new U_USR_GroupsDAL(); var data = obj.GetJoinedGroupsDetailsDb(Id); return(data); }
public string CreateGroup(GroupDetails obj) { try { U_USR_GroupsDAL ocontactsDAL = new U_USR_GroupsDAL(); U_USR_Groups ogroup = new U_USR_Groups(); ogroup.Group_Id = Guid.NewGuid().ToString(); ogroup.Group_Name = obj.Group_Name; ogroup.Group_Source = ""; ogroup.Group_Status = "1"; ogroup.Usr_Id = obj.User_Id; ogroup.Updated_by = ""; ogroup.Updated_Date = DateTime.Now; ogroup.Created_by = ""; ogroup.Created_Date = DateTime.Now; ogroup.Group_Desc = ""; bool status = ocontactsDAL.InsertU_USR_Groups(ogroup); if (status == true) { return("1"); } else { return("0"); } } catch (Exception ex) { Console.Write(ex); return(null); } }
public GroupDetails[] GetUserGroups(string id) { try { U_USR_GroupsDAL ocontactsDAL = new U_USR_GroupsDAL(); return(ocontactsDAL.Select_Groups(id)); } catch (Exception ex) { Console.Write(ex); return(null); } }
public string DeleteGroup(string id) { try { U_USR_GroupsDAL ocontactsDAL = new U_USR_GroupsDAL(); bool status = ocontactsDAL.Delete_Group(id); if (status == true) { return("1"); } else { return("0"); } } catch (Exception ex) { Console.Write(ex); return(null); } }
public string EditGroup(GroupDetails obj) { try { U_USR_GroupsDAL ocontactsDAL = new U_USR_GroupsDAL(); bool status = ocontactsDAL.Edit_Groups(obj.Group_Id, obj.Group_Name); if (status == true) { return("1"); } else { return("0"); } } catch (Exception ex) { Console.Write(ex); return(null); } }