Ejemplo n.º 1
0
        private void LoadStorageInfo()
        {
            Caisis.BOL.SpecimenStorage storage = new Caisis.BOL.SpecimenStorage();
            storage.Get(this._storageId);
            CICHelper.SetFieldValues(this.inputControlsRow.Controls, storage);

            SpecimenSite site = new SpecimenSite();

            //site.Get(Int32.Parse(storage[Caisis.BOL.SpecimenStorage.SiteId].ToString()));
            site.Get(_siteId);

            this.PageTitle.Text = site[SpecimenSite.SiteName].ToString() + " > " + storage[Caisis.BOL.SpecimenStorage.StorageName].ToString();
        }
Ejemplo n.º 2
0
        private void LoadContainerInfo()
        {
            SpecimenContainer container = new SpecimenContainer();

            container.Get(this._containerId);
            CICHelper.SetFieldValues(this.inputControlsRow.Controls, container);

            Caisis.BOL.SpecimenStorage storage = new Caisis.BOL.SpecimenStorage();
            storage.Get(Int32.Parse(container[SpecimenContainer.StorageId].ToString()));

            SpecimenSite site = new SpecimenSite();

            site.Get(Int32.Parse(storage[Caisis.BOL.SpecimenStorage.SiteId].ToString()));

            this.PageTitle.Text = site[SpecimenSite.SiteName].ToString() + " > " + storage[Caisis.BOL.SpecimenStorage.StorageName].ToString() + " > " + container[SpecimenContainer.ContainerName].ToString();
        }
Ejemplo n.º 3
0
        protected void Save_Click(object sender, CommandEventArgs e)
        {
            Caisis.BOL.SpecimenStorage storage = new Caisis.BOL.SpecimenStorage();
            storage.Get(this._storageId);
            bool isNewRecord = this._siteId == 0 ? false : true;

            CICHelper.SetBOValues(Page.FindControl("inputControlsRow").Controls, storage, 0);

            // set parent id for new record
            if (isNewRecord)
            {
                storage[Caisis.BOL.SpecimenStorage.SiteId] = _siteId;
            }
            storage.Save();

            // Closes the modal window, and signal main page to either update the text when updating a record
            // to or resubmit the form to reflect the new record
            //ClientScript.RegisterClientScriptBlock(Page.GetType(), "x1", "<script language=\"javascript\">if(top.updatePage) { top.updatePage('" + Name.Value + "'," + (this._storageId == 0 ? "true" : "false") + "); }hideModal();</script>");

            CloseThisPage(false);
        }
Ejemplo n.º 4
0
        private void LoadBoxInfo()
        {
            SpecimenBox box = new SpecimenBox();

            box.Get(this._boxId);
            CICHelper.SetFieldValues(this.inputControlsRow.Controls, box);

            SpecimenContainer container = new SpecimenContainer();

            container.Get(this._containerId);

            Caisis.BOL.SpecimenStorage storage = new Caisis.BOL.SpecimenStorage();
            storage.Get(Int32.Parse(container[SpecimenContainer.StorageId].ToString()));

            SpecimenSite site = new SpecimenSite();

            site.Get(Int32.Parse(storage[Caisis.BOL.SpecimenStorage.SiteId].ToString()));

            this.PageTitle.Text = site[SpecimenSite.SiteName].ToString() + " > " + storage[Caisis.BOL.SpecimenStorage.StorageName].ToString() + " > " + container[SpecimenContainer.ContainerName].ToString() + " > " + box[SpecimenBox.BoxName].ToString();
            BoxName.Value       = box[SpecimenBox.BoxName].ToString();

            DataTable dt = da.GetSpecimensByBoxId(_boxId);

            //Disables editing of columns & rows if box contains specimens
            if (dt.Rows.Count == 0)
            {
                NoOfColumns.ReadOnly = false;
                NoOfRows.ReadOnly    = false;
            }
            else
            {
                NoOfColumns.ReadOnly = true;
                NoOfRows.ReadOnly    = true;
                NoOfColumns.ToolTip  = "# of columns can not be changed with specimens in Box";
                NoOfRows.ToolTip     = "# of rows can not be changed with specimens in Box";
            }
        }