public override int GetHashCode()
 {
     unchecked
     {
         int result = (Name != null ? Name.GetHashCode() : 0);
         result = (result * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         result = (result * 397) ^ (Accession != null ? Accession.GetHashCode() : 0);
         result = (result * 397) ^ (Gene != null ? Gene.GetHashCode() : 0);
         result = (result * 397) ^ (Species != null ? Species.GetHashCode() : 0);
         result = (result * 397) ^ (PreferredName != null ? PreferredName.GetHashCode() : 0);
         result = (result * 397) ^ (WebSearchInfo != null ? WebSearchInfo.GetHashCode() : 0); // not proper metadata but worth noting when it changes
         return(result);
     }
 }
Beispiel #2
0
        /// <summary>
        ///     Object hash code
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = Name != null?Name.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (Accession != null ? Accession.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ Length;
                hashCode = (hashCode * 397) ^ (Seq != null ? Seq.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (SearchDatabase != null ? SearchDatabase.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (CVParams != null ? CVParams.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (UserParams != null ? UserParams.GetHashCode() : 0);
                return(hashCode);
            }
        }
Beispiel #3
0
        public void show_data(int ID)
        {
            A_Handler = new AccessionHandler();
            A1        = new Accession();
            A1        = A_Handler.GetAccessionDetails(ID);


            txtAcc_id.Text = A1.Acc_id.ToString();

            ddlReg_id.SelectedValue = A1.Reg_id.ToString();

            ddlBook_id.SelectedValue = A1.Book_id.ToString();

            ddlCollege_id.SelectedValue = A1.College_id.ToString();

            txtAcc_code.Text = A1.Acc_code.ToString();

            txtLocation.Text = A1.Location.ToString();



            DropDownList1.SelectedValue = A1.Is_issue.ToString();

            DropDownList2.SelectedValue = A1.Status.ToString();

            btnSubmit.Text = "Update";
            btnReset.Text  = "Cancel";

            if (Request.QueryString["action"] == "del")
            {
                Label1.Text           = "Are U Sure, U want to  Delete a Record ?";
                txtAcc_id.ReadOnly    = false;
                ddlReg_id.Enabled     = false;
                ddlBook_id.Enabled    = false;
                ddlCollege_id.Enabled = false;
                txtAcc_code.ReadOnly  = false;
                txtLocation.ReadOnly  = false;

                DropDownList1.Enabled = false;
                DropDownList2.Enabled = false;
                btnSubmit.Text        = "Delete";
            }
        }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["id"] != null)
         {
             A1 = new Accession();
             int ID = Convert.ToInt32(Request.QueryString["id"]);
             show_data(ID);
         }
         MyClass my = new MyClass();
         if (Session["College_id"] != null)
         {
             cid = int.Parse(Session["College_id"].ToString());
         }
         //    Label2.Text = cid.ToString();
         //    Label3.Text = my.Get_College(cid);
         //}
         //my.FillCombo(ddlBook_id, "Book_Master", "Title", "book_id", "");
         //my.FillCombo(ddlCollege_id, "College", "College_Name", "College_id", "");
     }
 }
Beispiel #5
0
    public ILC(String id, String accessionNumber, String user)
    {
        DataTable ILCMessages = DL_ILC.getILCMessages(id, user);

        if (ILCMessages == null)
        {
            this.IsValid = false;
        }
        else if (ILCMessages.Rows.Count < 1)
        {
            this.IsValid = false;
        }
        else
        {
            _isValid               = true;
            _rowId                 = id;
            _accession             = new Accession(accessionNumber);
            _tubeLocation          = AccessionExtended.getSpecimenLocation(accessionNumber);
            _previousCommunication = ILCMessages;
            _testsString           = DL_ILC.getILCTestsString(id);
            _defaultToLab          = DL_ILC.getDefaultILCToLab(id);
        }
    }
Beispiel #6
0
 // This fuction does not contain any business logic, it simply returns the
 // list of accessions, we can put some logic here if needed
 public bool AddNewAccession(Accession b1)
 {
     return(accessionDb.AddNewAccession(b1));
 }
Beispiel #7
0
 // This fuction does not contain any business logic, it simply returns the
 // list of accessions, we can put some logic here if needed
 public bool DeleteAccession(Accession b1)
 {
     return(accessionDb.DeleteAccession(b1));
 }
Beispiel #8
0
 // This fuction does not contain any business logic, it simply returns the
 // list of accessions, we can put some logic here if needed
 public bool UpdateAccession(Accession b1)
 {
     return(accessionDb.UpdateAccession(b1));
 }
Beispiel #9
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            A_Handler = new AccessionHandler();
            A1        = new Accession();


            //A1.Acc_id = Convert.ToInt32(txtAcc_id.Text);
            A1.Reg_id     = Convert.ToInt32(ddlReg_id.SelectedValue);
            A1.Book_id    = Convert.ToInt32(ddlBook_id.SelectedValue);
            A1.College_id = Convert.ToInt32(ddlCollege_id.SelectedValue);
            A1.Acc_code   = txtAcc_code.Text;
            A1.Location   = txtLocation.Text;

            A1.Is_issue = Convert.ToInt32(DropDownList1.SelectedValue.ToString());
            A1.Status   = Convert.ToInt32(DropDownList2.SelectedValue.ToString());



            if (btnSubmit.Text == "Submit")
            {
                bool B = A_Handler.AddNewAccession(A1);
                if (B == true)
                {
                    Label1.Text = "Record Inserted";
                    MSG         = "Record Inserted";
                }
                else
                {
                    Label1.Text = "Record Not Inserted";
                    MSG         = "Record Not Inserted";
                }
            }
            else if (btnSubmit.Text == "Update")
            {
                A1.Acc_id = Convert.ToInt32(txtAcc_id.Text);
                bool B = A_Handler.UpdateAccession(A1);
                if (B == true)
                {
                    Label1.Text = "Record Updated";
                    MSG         = "Record Not Updated";
                }
                else
                {
                    Label1.Text = "Record Not Updated";
                    MSG         = "Record Not Updated";
                }
            }
            else if (btnSubmit.Text == "Delete")
            {
                A1.Acc_id = Convert.ToInt32(txtAcc_id.Text);
                bool B = A_Handler.DeleteAccession(A1);
                if (B == true)
                {
                    Label1.Text = "Record Deleted";
                    MSG         = "Record Deleted";
                }
                else
                {
                    Label1.Text = "Record Not Deleted";
                    MSG         = "Record Not Deleted";
                }
            }

            //  Response.Redirect("~/ADMIN/Accession_list.aspx?msg="+MSG);
        }