Пример #1
0
        public void GetCageIds()
        {
            CageReportsDAO cg_firstload = new CageReportsDAO();
            string         carrierid    = DD_carrier.SelectedItem.Value;
            string         cagesids     = cg_firstload.Getcageidstring(carrierid);

            if (cagesids == string.Empty || cagesids == "null" || cagesids == "0")
            {
                cages = "No cages for Despatch";
            }
            else
            {
                cages = "Click OK to Despatch " + cagesids + " Cages for " + carrierid;
            }
        }
Пример #2
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            string         carrid = DD_carrier.SelectedItem.Value;
            DespatchDAO    desdao = new DespatchDAO();
            CageReportsDAO crdao  = new CageReportsDAO();

            try
            {
                string carrbarcode = crdao.GetCarrierBarcode(carrid);

                decimal cagecount = desdao.ValidateCagesForDespatch(carrbarcode);
                if (cagecount > 0)
                {
                    string queueoutput = desdao.QueueForDespatch(carrbarcode, username);
                }

                this.BindData_troverview(carrid);

                RadGrid2.Rebind();

                CageReportsDAO cg_firstload = new CageReportsDAO();
                string         carrierid    = DD_carrier.SelectedItem.Value;
                string         cagesids     = cg_firstload.Getcageidstring(carrierid);
                if (cagesids == string.Empty || cagesids == "null" || cagesids == "0")
                {
                    Label1.Text = string.Empty;
                }
                else
                {
                    Label1.Text      = "Cages Despatched for " + carrid;
                    Label1.ForeColor = Color.Blue;
                }
            }
            catch (Exception Ex2)
            {
                Label1.Text      = "Error:" + Ex2.Message.Substring(Ex2.Message.IndexOf(" ", 0), (Ex2.Message.IndexOf("ORA", 1) - Ex2.Message.IndexOf(" ", 0)));
                Label1.Visible   = true;
                Label1.ForeColor = Color.Red;
            }

            Label1.Visible = true;
        }