protected void Page_Load(object sender, EventArgs e)
    {
        PrintSettingBLL.Reload();

        int    campID  = Request["CampaignID"].ToInt();
        string rptType = Request["RptType"];

        if (campID == 0 ||
            string.IsNullOrEmpty(rptType))
        {
            return;
        }

        ReportType type = (ReportType)rptType.ToInt();

        List <Donation> pl = DonationBLL.Get(campID, type);

        foreach (Donation item in pl)
        {
            Panel p = new Panel();
            p.Style.Add("position", "relative");
            p.Style.Add("page-break-after", "always");

            p.Style.Apply(PrintSettingBLL.Envelope.PaperSize);

            p.Style.Add("border", "1px solid white");
            divCon.Controls.Add(p);


            AddControl(item, p);
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            PrintSettingBLL.Reload();
            DonationBLL bll = new DonationBLL();

            int    campID  = Request["CampaignID"].ToInt();
            string rptType = Request["RptType"];
            string DINList = Request["DINList"];

            List <Donation> pL = new List <Donation>();

            if (campID != 0 &&
                !string.IsNullOrEmpty(rptType))
            {
                ReportType type = (ReportType)rptType.ToInt();
                pL = DonationBLL.Get(campID, type);
            }
            else if (!string.IsNullOrEmpty(DINList))
            {
                pL = bll.Get(DINList.Split(','));
            }

            foreach (Donation item in pL)
            {
                Panel p = new Panel();
                p.Style.Add("position", "relative");
                p.Style.Add("page-break-after", "always");
                p.Style.Apply(PrintSettingBLL.Card.PaperSize);
                p.Style.Add("border", "1px solid white");
                divCon.Controls.Add(p);

                AddDINLabelControl(item, p);
            }
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        string code    = "";
        string addText = "";
        int    count   = 0;

        try
        {
            code = Request["code"];
        }
        catch (Exception)
        {
        }

        try
        {
            count = Request["count"].ToInt();
        }
        catch (Exception)
        {
        }

        try
        {
            addText = Request["addText"];
        }
        catch (Exception)
        {
        }

        RedBloodDataContext db   = new RedBloodDataContext();
        Product             item = db.Products.Where(r => r.Code == code).FirstOrDefault();

        if (item == null)
        {
            return;
        }

        PrintSettingBLL.Reload();

        for (int i = 0; i < count / 2 + 1; i++)
        {
            Panel p = new Panel();
            p.Style.Add("position", "relative");
            p.Style.Add("page-break-after", "always");
            p.Style.Apply(PrintSettingBLL.ProductLabel.PaperSize);
            p.Style.Add("border", "1px solid white");
            divCon.Controls.Add(p);

            AddControl(item, PrintSettingBLL.ProductLabel.Label1, p, addText);
            AddControl(item, PrintSettingBLL.ProductLabel.Label2, p, addText);
        }
    }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string code    = "";
        string addText = "";
        int    count   = 0;

        try
        {
            code = Request["code"];
        }
        catch (Exception)
        {
        }

        try
        {
            count = Request["count"].ToInt();
        }
        catch (Exception)
        {
        }

        try
        {
            addText = Request["addText"];
        }
        catch (Exception)
        {
        }

        PrintSettingBLL.Reload();
        RedBloodDataContext db = new RedBloodDataContext();
        string desc            = BloodGroupBLL.GetDescription(code);

        for (int i = 0; i < count; i++)
        {
            Panel p = new Panel();
            p.Style.Add("position", "relative");
            p.Style.Add("page-break-after", "always");
            p.Style.Apply(PrintSettingBLL.BloodGroupLabel.PaperSize);
            p.Style.Add("border", "1px solid white");
            divCon.Controls.Add(p);

            AddDINLabelControl(code, desc + addText, PrintSettingBLL.BloodGroupLabel.Label1, p);
            AddDINLabelControl(code, desc + addText, PrintSettingBLL.BloodGroupLabel.Label2, p);
            AddDINLabelControl(code, desc + addText, PrintSettingBLL.BloodGroupLabel.Label3, p);
        }
    }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int numOfDIN = 0, numOfCopy = 0;

            try
            {
                numOfDIN = Request["numOfDIN"].ToString().ToInt();
            }
            catch (Exception)
            {
            }

            try
            {
                numOfCopy = Request["numOfCopy"].ToString().ToInt();
            }
            catch (Exception)
            {
            }


            PrintSettingBLL.Reload();
            List <Donation> l = DonationBLL.New(numOfDIN);

            foreach (Donation item in l)
            {
                Panel p = new Panel();
                p.Style.Add("position", "relative");
                p.Style.Add("page-break-after", "always");
                p.Style.Apply(PrintSettingBLL.DINLabel.PaperSize);
                p.Style.Add("border", "1px solid white");
                divCon.Controls.Add(p);

                AddDINLabelControl(item, PrintSettingBLL.DINLabel.Label1, p);
                AddDINLabelControl(item, PrintSettingBLL.DINLabel.Label2, p);
                AddDINLabelControl(item, PrintSettingBLL.DINLabel.Label3, p);
                AddDINLabelControl(item, PrintSettingBLL.DINLabel.Label4, p);
                AddDINLabelControl(item, PrintSettingBLL.DINLabel.Label5, p);
                AddDINLabelControl(item, PrintSettingBLL.DINLabel.Label6, p);
                AddDINLabelControl(item, PrintSettingBLL.DINLabel.Label7, p);
                AddDINLabelControl(item, PrintSettingBLL.DINLabel.Label8, p);
                AddDINLabelControl(item, PrintSettingBLL.DINLabel.Label9, p);
                AddDINLabelControl(item, PrintSettingBLL.DINLabel.Label10, p);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            PrintSettingBLL.Reload();

            string      strPackList = Request["PackList"];
            List <Guid> packIDList  = new List <Guid>();

            if (!string.IsNullOrEmpty(strPackList))
            {
                var strArr = strPackList.Split(',');
                foreach (var item in strArr)
                {
                    Guid id;
                    if (Guid.TryParse(item, out id))
                    {
                        packIDList.Add(id);
                    }
                }
            }

            RedBloodDataContext db = new RedBloodDataContext();
            var pL = db.Packs.Where(r => r.Donation.TestResultStatus == Donation.TestResultStatusX.Negative &&
                                    packIDList.Contains(r.ID))
                     .OrderBy(r => r.ProductCode)
                     .ThenBy(r => r.DIN).ToList();

            foreach (var item in pL)
            {
                Panel p = new Panel();
                p.Style.Add("position", "relative");
                p.Style.Add("page-break-after", "always");
                p.Style.Apply(PrintSettingBLL.FinalLabel.PaperSize);
                p.Style.Add("border", "1px solid white");
                divCon.Controls.Add(p);

                AddControl(item, p);
            }
        }