public OfficesHierarchyDataSet GetAllUsersInOffice(string officeUnitID) { OfficesHierarchyDataSet officesOfUser = new OfficesHierarchyDataSet(); Helper.Fill(officesOfUser.OrganisationUser, "P_IC_USERS_IN_OFFICE_GET", officeUnitID); return officesOfUser; }
public OfficesHierarchyDataSet GetAllOfficesOfUser(string userName) { OfficesHierarchyDataSet officesOfUser = new OfficesHierarchyDataSet(); Helper.Fill(officesOfUser.OrganisationUser, "P_IC_OFFICES_USER_GET", userName); return officesOfUser; }
public void CollectOrganisationData(out OfficesHierarchyDataSet.OrganisationUserDataTable removedOfficeList, out OfficesHierarchyDataSet.OrganisationUserDataTable newOfficeList) { this._maintainOrganisationForUser.SaveSelectedOffices(this.SelectOfficeListView, this.txt_username.Text.Trim(), out removedOfficeList, out newOfficeList); }
public OfficesHierarchyDataSet GetOfficesHierarchy(string userName,string codeID) { OfficesHierarchyDataSet ds = new OfficesHierarchyDataSet(); Dictionary<string, string> tables = new Dictionary<string, string>(); tables.Add(ds.LookupOrganisationalUnitHierarchy.TableName, "P_IC_OFFICES_GET"); tables.Add(ds.OrganisationUser.TableName, "P_IC_OFFICES_USER_GET"); CommandList commands = Helper.BuildFillCommandList(ds, tables); Helper.AssignParameterValues(commands[ds.LookupOrganisationalUnitHierarchy.TableName].SelectCommand, codeID); Helper.AssignParameterValues(commands[ds.OrganisationUser.TableName].SelectCommand, userName); Helper.Fill(ds, commands); return ds; }
public OfficesHierarchyDataSet GetOfficesAllHierarchy(string userName) { OfficesHierarchyDataSet ds = new OfficesHierarchyDataSet(); this.Helper.Fill(ds.LookupOrganisationalUnitHierarchy, "P_IC_OFFICES_GET_ALL"); if (!string.IsNullOrEmpty(userName)) { this.Helper.Fill(ds.OrganisationUser, "P_IC_OFFICES_USER_GET", userName); } return ds; }
public void InsertOfficesOfUser(OfficesHierarchyDataSet.OrganisationUserDataTable officesOfUser) { if (officesOfUser == null) { return; } DataRow[] rows = officesOfUser.Select("", "", DataViewRowState.Added); if (rows.Length == 0) { return; } Database db = DatabaseFactory.CreateDatabase(); DbCommand command = db.GetStoredProcCommand("P_IC_OFFICES_USER_I"); db.AddInParameter(command, "UserID", DbType.String, "UserID", DataRowVersion.Current); db.AddInParameter(command, "NodeID", DbType.String, "NodeID", DataRowVersion.Current); db.AddInParameter(command, "UnitID", DbType.String, "UnitID", DataRowVersion.Current); db.AddInParameter(command, "VersionNO", DbType.Int32, 1); db.AddInParameter(command, "TransactionID", DbType.String, ApplicationContextFactory.GetApplicationContext().TransactionId); db.AddInParameter(command, "CreatedBY", DbType.String, AppContext.Current.UserName); db.AddInParameter(command, "CreatedTime", DbType.DateTime, DateTime.Now); db.UpdateDataSet(rows, command, null, null, UpdateBehavior.Standard); }