コード例 #1
0
        public HomePage()
        {
            myWindows = new List <Window>();

            InitializeComponent();

            rentals   = Rental_HistoryTableAdapter.getInstance();
            resources = ResourcesTableAdapter.getInstance();
        }
コード例 #2
0
        public ReturnView()
        {
            rentals   = Rental_HistoryTableAdapter.getInstance();
            resources = ResourcesTableAdapter.getInstance();

            rental      = null;
            rentalFound = false;
            InitializeComponent();
        }
コード例 #3
0
ファイル: CoronaService.cs プロジェクト: yeyue910107/Moon
        public CoronaService(string dbpath)
        {
            DBPath = dbpath;
            Init();

            MoonDataset       = new MoonDataSet();
            ResrcTableAdapter = new ResourcesTableAdapter();
            TagTableAdapter   = new TagsTableAdapter();
        }
コード例 #4
0
ファイル: CoronaService.cs プロジェクト: bleastrind/Moon
        public CoronaService(string dbpath)
        {
            DBPath = dbpath;
            Init();

            MoonDataset = new MoonDataSet();
            ResrcTableAdapter = new ResourcesTableAdapter();
            TagTableAdapter = new TagsTableAdapter();
        }
コード例 #5
0
        public ManageResourcesView()
        {
            resources = ResourcesTableAdapter.getInstance();
            types     = ResourceTypeTableAdapter.getInstance();

            resourceConverter = new ResourceConverter();
            typeConverter     = new ResourceTypeConverter();

            InitializeComponent();
        }
コード例 #6
0
ファイル: Form1.cs プロジェクト: imaxmunguia/EjemploPracticos
        private void BindToDataSet()
        {
            if (this.schedulerDataSet == null)
            {
                this.schedulerDataSet = new SchedulerDataSet();

                this.appointmentsAdapter.Fill(this.schedulerDataSet.Appointments);

                ResourcesTableAdapter resourcesAdapter = new ResourcesTableAdapter();
                resourcesAdapter.Fill(this.schedulerDataSet.Resources);

                AppointmentsResourcesTableAdapter appointmentsResourcesAdapter = new AppointmentsResourcesTableAdapter();
                appointmentsResourcesAdapter.Fill(this.schedulerDataSet.AppointmentsResources);
            }

            SchedulerBindingDataSource dataSource = new SchedulerBindingDataSource();

            dataSource.EventProvider.AppointmentFactory = this.radSchedulerDemo.AppointmentFactory;

            AppointmentMappingInfo appointmentMappingInfo = new AppointmentMappingInfo();

            appointmentMappingInfo.Mappings.Add(new SchedulerMapping("Email", "Email"));

            appointmentMappingInfo.UniqueId       = "ID";
            appointmentMappingInfo.Start          = "Start";
            appointmentMappingInfo.End            = "End";
            appointmentMappingInfo.Summary        = "Summary";
            appointmentMappingInfo.Description    = "Description";
            appointmentMappingInfo.Location       = "Location";
            appointmentMappingInfo.BackgroundId   = "BackgroundID";
            appointmentMappingInfo.StatusId       = "StatusID";
            appointmentMappingInfo.Resources      = "AppointmentsAppointmentsResources";
            appointmentMappingInfo.ResourceId     = "ResourceID";
            appointmentMappingInfo.RecurrenceRule = "RecurrenceRule";
            appointmentMappingInfo.Exceptions     = "AppointmentsAppointments";
            appointmentMappingInfo.MasterEventId  = "ParentID";
            appointmentMappingInfo.Visible        = "Visible";

            dataSource.EventProvider.Mapping    = appointmentMappingInfo;
            dataSource.EventProvider.DataSource = this.schedulerDataSet.Appointments;

            ResourceMappingInfo resourceMappingInfo = new ResourceMappingInfo();

            resourceMappingInfo.Id   = "ID";
            resourceMappingInfo.Name = "ResourceName";

            dataSource.ResourceProvider.Mapping    = resourceMappingInfo;
            dataSource.ResourceProvider.DataSource = this.schedulerDataSet.Resources;

            this.radSchedulerDemo.DataSource = dataSource;
        }
コード例 #7
0
        public CheckoutWindow(Rental theRental = null, bool isEdit = false)
        {
            if (theRental == null)
            {
                theRental = new Rental();
            }

            renters   = RenterTableAdapter.getInstance();
            resources = ResourcesTableAdapter.getInstance();
            rentals   = Rental_HistoryTableAdapter.getInstance();

            SetRentalToView(theRental, isEdit);

            InitializeComponent();

            initializeFields();
        }
コード例 #8
0
        private void BindToDataSet()
        {
            if (this.schedulerDataSet == null)
            {
                this.schedulerDataSet = new SchedulerDataset();

                AppointmentsTableAdapter appointmentsAdapter = new AppointmentsTableAdapter();
                appointmentsAdapter.Fill(this.schedulerDataSet.Appointments);

                ResourcesTableAdapter resourcesAdapter = new ResourcesTableAdapter();
                resourcesAdapter.Fill(this.schedulerDataSet.Resources);

                TransientAppointmentsResourcesTableAdapter appointmentsResourcesAdapter = new TransientAppointmentsResourcesTableAdapter();
                appointmentsResourcesAdapter.Fill(this.schedulerDataSet.TransientAppointmentsResources);
            }

            SchedulerBindingDataSource dataSource             = new SchedulerBindingDataSource();
            AppointmentMappingInfo     appointmentMappingInfo = new AppointmentMappingInfo();

            appointmentMappingInfo.Start          = "Start";
            appointmentMappingInfo.End            = "End";
            appointmentMappingInfo.Summary        = "Summary";
            appointmentMappingInfo.Description    = "Description";
            appointmentMappingInfo.Location       = "Location";
            appointmentMappingInfo.BackgroundId   = "BackgroundID";
            appointmentMappingInfo.StatusId       = "StatusID";
            appointmentMappingInfo.Resources      = "Appointments_AppointmentsResources";
            appointmentMappingInfo.ResourceId     = "ResourceID";
            appointmentMappingInfo.RecurrenceRule = "RecurrenceRule";

            dataSource.EventProvider.Mapping    = appointmentMappingInfo;
            dataSource.EventProvider.DataSource = this.schedulerDataSet.Appointments;

            ResourceMappingInfo resourceMappingInfo = new ResourceMappingInfo();

            resourceMappingInfo.Id   = "ID";
            resourceMappingInfo.Name = "ResourceName";

            dataSource.ResourceProvider.Mapping    = resourceMappingInfo;
            dataSource.ResourceProvider.DataSource = this.schedulerDataSet.Resources;

            this.radSchedulerDemo.DataSource = dataSource;
        }
コード例 #9
0
        public AddEditResourceView(Resource theResource = null, ResourceType[] types = null, bool isEdit = false)
        {
            resources = ResourcesTableAdapter.getInstance();
            if (types == null)
            {
                types = new ResourceType[0];
            }

            Types = types;

            if (theResource == null)
            {
                theResource = new Resource();
            }

            SetResourceToView(theResource, isEdit);

            InitializeComponent();

            intializeFields();
        }
コード例 #10
0
ファイル: ResourceEdit.aspx.cs プロジェクト: gmhawash/SSR
    protected void Page_Load(object sender, EventArgs e)
    {
        foreach (StructControl ctrl in m_controls)
        {
          ObjectDataSource ods = new ObjectDataSource(ctrl.DataSource, ctrl.SelectMethod);
          ods.DataObjectTypeName = "System.Guid";
          DropDownList dd = new DropDownList();
          dd.DataTextField = ctrl.TextField;
          dd.DataValueField = ctrl.ValueField;
          dd.ID = ctrl.Title.Replace(' ', '_');
          dd.DataSource = ods;
          dd.SelectedIndexChanged += new EventHandler(dd_SelectedIndexChanged);
          dd.PreRender += new EventHandler(dd_PreRender);
          dd.DataBind();

          dd.AutoPostBack = true;
          Panel1.Controls.Add(new LiteralControl(string.Format("<div><label class='{0}'>{1}</label><br/>", ctrl.Required, ctrl.Title)));
          Panel1.Controls.Add(dd);
          Panel1.Controls.Add(new LiteralControl("</div>"));
        }

        if (!IsPostBack)
        {
          MembershipUser User = Membership.GetUser(new Guid(Request["Id"]));
          Guid UserGUID = (Guid)User.ProviderUserKey;

          ResourcesTableAdapter ta = new ResourcesTableAdapter();
          Tracker.ResourcesDataTable dt = ta.GetResource(UserGUID);
          SetValue("Dept", dt[0].DeptId);
          SetValue("Group", dt[0].GroupId);
          SetValue("Team", dt[0].TeamId);
          Active.Checked = dt[0].Active;
          Active.Enabled = !Utility.IsAssigned(UserGUID);
          Active.Text = Active.Enabled ? "Active" : "Active - <small>Currently assigned to In Progress SSRs</small>";
        }
    }
コード例 #11
0
 public ResourceConverter()
 {
     table     = ResourcesTableAdapter.getInstance();
     typeTable = ResourceTypeTableAdapter.getInstance();
 }
コード例 #12
0
ファイル: RentalConverter.cs プロジェクト: mdavis60/PolyRents
 public RentalConverter()
 {
     rentalTable    = Rental_HistoryTableAdapter.getInstance();
     renterTable    = RenterTableAdapter.getInstance();
     resourcesTable = ResourcesTableAdapter.getInstance();
 }
コード例 #13
0
ファイル: ResourceEdit.aspx.cs プロジェクト: gmhawash/SSR
    protected void Save_Click(object sender, EventArgs e)
    {
        MembershipUser User = Membership.GetUser(new Guid(Request["Id"]));
        Guid UserGUID = (Guid)User.ProviderUserKey;

        ResourcesTableAdapter ta = new ResourcesTableAdapter();

        Tracker.ResourcesDataTable dt = ta.GetResource(UserGUID);
        dt[0].GroupId = GetId("Group");
        dt[0].DeptId = GetId("Dept");
        dt[0].TeamId = GetId("Team");
        ta.Update1(GetId("Dept"), GetId("Group"), GetId("Team"), Active.Checked, UserGUID);
        GoBack();
    }
コード例 #14
0
ファイル: NewResource.aspx.cs プロジェクト: gmhawash/SSR
    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Wizard_FinishClick(object sender, EventArgs e)
    {
        MembershipUser User = Membership.GetUser(CreateUserWizard1.UserName);
        Guid UserGUID = (Guid)User.ProviderUserKey;

        ResourcesTableAdapter ta = new ResourcesTableAdapter();
        ta.Insert(UserGUID, GetId("Dept"), GetId("Group"), GetId("Team"), true);

        DropDownList dd = (DropDownList)Panel1.FindControl("Role");
        Roles.AddUserToRole(CreateUserWizard1.UserName, dd.SelectedItem.Text);

        Literal2.Text = string.Format(@"<em>Account created successfully:</em>
                                  <br/><br/>Username: {0}
                                  <br/>Email: {1}
                                  <br/>Team: {2}
                                  <br/>Group: {3}
                                  <br/>Role: {4}"
                                  , CreateUserWizard1.UserName, CreateUserWizard1.Email
                                  , ((DropDownList)Panel1.FindControl("Team")).SelectedItem.Text
                                  , ((DropDownList)Panel1.FindControl("Group")).SelectedItem.Text
                                  , ((DropDownList)Panel1.FindControl("Role")).SelectedItem.Text
                                  );
    }