Ejemplo n.º 1
0
    public void LoadReturn()
    {
        Return e = new Return();

        if (ReturnID == 0)
        {
            imgOrder.ImageUrl = "none";
            btnOk.Enabled     = true;
        }
        else
        {
            e = ReturnBLL.Get(ReturnID);
            imgOrder.ImageUrl = BarcodeBLL.Url4Return(e.ID);
            btnOk.Enabled     = false;
        }

        txtNote.Text = e.Note;

        txtDate.Text = e.Date.ToStringVN_Hour();

        PackOrderList = e.PackOrders.Select(r => r.ID).ToList();

        GridViewPack.DataBind();

        CurrentDIN             = "";
        imgCurrentDIN.ImageUrl = "none";
    }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string code = Master.TextBoxCode.Text.Trim();

            Master.TextBoxCode.Text = "";

            if (code.Length == 0)
            {
                return;
            }

            if (BarcodeBLL.IsValidDINCode(code))
            {
                EnterDIN(BarcodeBLL.ParseDIN(code));
            }
            else if (BarcodeBLL.IsValidProductCode(code))
            {
                EnterProductCode(BarcodeBLL.ParseProductCode(code));
            }
            else if (BarcodeBLL.IsValidBloodGroupCode(code))
            {
                //TODO: ProductCode must enter before BloodGroup
                EnterBloodGroup(BarcodeBLL.ParseBloodGroupCode(code));
            }
        }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int campaignID = Request.Params["key"].ToInt();

            if (campaignID != 0)
            {
                CampaignEnter(campaignID);
            }
        }
        else
        {
            string code = Master.TextBoxCode.Text.Trim();
            Master.TextBoxCode.Text = "";

            if (code.Length == 0)
            {
                return;
            }

            if (BarcodeBLL.IsValidCampaignCode(code))
            {
                CampaignEnter(BarcodeBLL.ParseCampaignID(code));
            }
        }
    }
Ejemplo n.º 4
0
    void LoadCurrentDIN(string DIN)
    {
        Donation e = DonationBLL.Get4Order(DIN);

        CurrentDIN             = e.DIN;
        imgCurrentDIN.ImageUrl = BarcodeBLL.Url4DIN(e.DIN);
    }
Ejemplo n.º 5
0
    void LoadPack(string productCode)
    {
        Pack p = PackBLL.Get4ReportSideEffects(DIN, productCode);

        ProductCode           = productCode;
        ImageProduct.ImageUrl = BarcodeBLL.Url4Product(p.ProductCode);
    }
Ejemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string code = Master.TextBoxCode.Text.Trim();

        Master.TextBoxCode.Text = "";

        if (code.Length == 0)
        {
            return;
        }


        if (rdbProductCodeIn.Checked)
        {
            if (BarcodeBLL.IsValidProductCode(code))
            {
                ProductCodeInList = receiptBLL.AddProductCodeIn(BarcodeBLL.ParseProductCode(code));
                DataListProductIn.DataBind();
            }
        }
        else if (rdbProductCodeOut.Checked)
        {
            if (BarcodeBLL.IsValidProductCode(code))
            {
                ProductCodeOutList = receiptBLL.AddProductCodeOut(BarcodeBLL.ParseProductCode(code));
                DataListProductOut.DataBind();
            }
        }
    }
Ejemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
        }
        else
        {
            ucPeople.PeopleChanged += new EventHandler(ucPeople_PeopleChanged);

            string code = Master.TextBoxCode.Text.Trim();
            Master.TextBoxCode.Text = "";

            if (code.Length == 0)
            {
                return;
            }

            if (BarcodeBLL.IsValidDINCode(code))
            {
                DINEnter(code);
            }
            else if (BarcodeBLL.IsValidCampaignCode(code))
            {
                CampaignEnter(code);
            }
            else if (BarcodeBLL.IsValidProductCode(code))
            {
            }
            else
            {
                ucPeople.Code = code;
            }
        }
    }
Ejemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int returnID = Request.Params["key"].ToInt();

            if (returnID != 0)
            {
                ReturnID = returnID;
            }
        }
        else
        {
            string code = Master.TextBoxCode.Text.Trim();
            Master.TextBoxCode.Text = "";

            if (BarcodeBLL.IsValidDINCode(code))
            {
                LoadCurrentDIN(BarcodeBLL.ParseDIN(code));
            }
            else if (BarcodeBLL.IsValidReturnCode(code))
            {
                ReturnID = BarcodeBLL.ParseReturnID(code);
            }
            else if (BarcodeBLL.IsValidProductCode(code))
            {
                AddPackOrder(BarcodeBLL.ParseProductCode(code));
            }
        }
    }
Ejemplo n.º 9
0
    public void LoadReturn()
    {
        Return e = new Return();

        if (ReturnID == 0)
        {
            imgOrder.ImageUrl = "none";
            btnOk.Enabled     = true;
        }
        else
        {
            e = ReturnBLL.Get(ReturnID);
            imgOrder.ImageUrl = BarcodeBLL.Url4Return(e.ID);
            btnOk.Enabled     = false;
        }

        txtNote.Text = e.Note;

        txtDate.Text = e.Date.ToStringVN_Hour();

        PackOrderList = e.PackOrders.Select(r => r.ID).ToList();

        urlPrint.NavigateUrl = ResolveClientUrl(string.Format("~/Store/PrintReturn.aspx?ReturnID={0}", e.ID));

        GridViewPack.DataBind();

        CurrentDIN             = "";
        imgCurrentDIN.ImageUrl = "none";

        GridViewSum.DataBind();
    }
Ejemplo n.º 10
0
    public void LoadDelete()
    {
        Delete e = new Delete();

        if (DeleteID == 0)
        {
            imgOrder.ImageUrl = "none";
            btnOk.Enabled     = true;
        }
        else
        {
            e = DeleteBLL.Get(DeleteID);
            imgOrder.ImageUrl = BarcodeBLL.Url4Delete(e.ID);
            btnOk.Enabled     = false;
        }

        txtNote.Text = e.Note;

        txtDate.Text = e.Date.ToStringVN_Hour();

        PackList = e.Packs.Select(r => r.ID).ToList();

        GridViewPack.DataBind();

        CurrentDIN             = "";
        imgCurrentDIN.ImageUrl = "none";
    }
Ejemplo n.º 11
0
 private void CampaignEnter(string code)
 {
     CampaignDetail1.CampaignID = BarcodeBLL.ParseCampaignID(code);
     GridView1.DataBind();
     GridViewLock.DataBind();
     GridViewUnCollect.DataBind();
 }
Ejemplo n.º 12
0
    public void LoadDelete()
    {
        Delete e = new Delete();

        if (DeleteID == 0)
        {
            imgOrder.ImageUrl = "none";
            btnOk.Enabled     = true;
        }
        else
        {
            e = DeleteBLL.Get(DeleteID);
            imgOrder.ImageUrl = BarcodeBLL.Url4Delete(e.ID);
            btnOk.Enabled     = false;
        }

        txtNote.Text = e.Note;

        txtDate.Text = e.Date.ToStringVN_Hour();

        PackList = e.Packs.Select(r => r.ID).ToList();

        GridViewPack.DataBind();

        CurrentDIN             = "";
        imgCurrentDIN.ImageUrl = "none";

        urlPrint.NavigateUrl = ResolveClientUrl(string.Format("~/Store/PrintDelete.aspx?DeleteID={0}", e.ID));

        GridViewSum.DataBind();
    }
    public void Fill_Letter(string code, string note)
    {
        Image1.ImageUrl = BarcodeBLL.Url4Product(code);
        Image1.Style.Apply(PrintSettingBLL.ProductLabel.ProductBarcode);

        txtNote.Text = note;
        txtNote.Style.Apply(PrintSettingBLL.ProductLabel.ProductDesc);
    }
    public void Fill_Letter(string DIN)
    {
        Image1.ImageUrl = BarcodeBLL.Url4DIN(DIN);
        Image1.Style.Apply(PrintSettingBLL.DINLabel.ImageDIN);

        txtCheckChar.Text = BarcodeBLL.CalculateISO7064Mod37_2(DIN);
        txtCheckChar.Style.Apply(PrintSettingBLL.DINLabel.CheckChar);
    }
Ejemplo n.º 15
0
    public void Fill_Letter(string code, string note)
    {
        Image1.ImageUrl = BarcodeBLL.Url4BloodGroup(code);
        Image1.Style.Apply(PrintSettingBLL.BloodGroupLabel.Barcode);

        txtNote.Text = note;
        txtNote.Style.Apply(PrintSettingBLL.BloodGroupLabel.BloodGroupDesc);
    }
    void LoadCurrentProduct(string productCode)
    {
        var v = ProductBLL.Get(productCode);

        if (v != null)
        {
            CurrentProductCode             = productCode;
            imgCurrentProductCode.ImageUrl = BarcodeBLL.Url4Product(productCode);
        }
    }
Ejemplo n.º 17
0
    public void LoadPeople()
    {
        People e = PeopleBLL.GetByID(PeopleID);

        if (e == null)
        {
        }
        else
        {
            imgCodabar.ImageUrl = BarcodeBLL.Url4People(e.Autonum);

            txtName.Text = e.Name;
            txtCMND.Text = e.CMND;

            txtDOB.Text = e.DOBToString;

            if (ddlSex.Items.Count == 1)
            {
                ddlSex.DataBind();
            }

            ddlSex.SelectedValue = e.SexID.ToString();

            txtResidentAddress.Text = e.ResidentAddress;
            if (e.ResidentGeo1 != null)
            {
                txtResidentGeo.Text = e.FullResidentalGeo;
            }


            if (e.EnableMailingAddress == null)
            {
                chkEnableMaillingAddress.Checked = false;
            }
            else
            {
                chkEnableMaillingAddress.Checked = e.EnableMailingAddress.Value;
            }

            txtMailingAddress.Enabled = chkEnableMaillingAddress.Checked;
            txtMailingGeo.Enabled     = chkEnableMaillingAddress.Checked;

            txtMailingAddress.Text = e.MailingAddress;
            if (e.MailingGeo1 != null)
            {
                txtMailingGeo.Text = e.FullMaillingGeo;
            }

            txtJob.Text   = e.Job;
            txtEmail.Text = e.Email;
            txtPhone.Text = e.Phone;
            txtNote.Text  = e.Note;
        }
    }
Ejemplo n.º 18
0
        void EnterDIN(string DINCode)
        {
            DIN = DINCode;

            DonationBLL.UpdateCollector(DIN, txtDefaultCollector.Text.Trim());
            if (BarcodeBLL.IsValidProductCode(txtProductCode.Text.Trim()))
            {
                PackBLL.Add(DIN, BarcodeBLL.ParseProductCode(txtProductCode.Text.Trim()), txtDefaultVolume.Text.ToInt());
            }
            LoadDIN();
        }
Ejemplo n.º 19
0
    //public void Clear()
    //{
    //    OrderID = 0;

    //    imgOrder.ImageUrl = "none";

    //    txtDate.Text = "";
    //    txtNote.Text = "";
    //    txtDept.Text = "";
    //    txtRoom.Text = "";
    //    txtBed.Text = "";
    //    txtDiagnosis.Text = "";
    //    txtPatientCode.Text = "";
    //    txtTransfusionNote.Text = "";
    //    People1.PeopleID = Guid.Empty;

    //    GridViewPack.DataBind();

    //    CurrentDIN = "";
    //    imgCurrentDIN.ImageUrl = "none";
    //}

    public void LoadOrder()
    {
        Order e = new Order();

        if (OrderID == 0)
        {
            imgOrder.ImageUrl = "none";
            People1.PeopleID  = Guid.Empty;
        }
        else
        {
            e = OrderBLL.Get(OrderID);

            if (e.Type == Order.TypeX.ForOrg)
            {
                Response.Redirect(RedBloodSystem.Url4Order4Org + "key=" + e.ID.ToString());
            }
            else if (e.Type == Order.TypeX.ForCR)
            {
                imgOrder.ImageUrl = BarcodeBLL.Url4Order(e.ID);
                People1.PeopleID  = e.People != null?e.PeopleID.GetValueOrDefault() : Guid.Empty;
            }
        }

        txtNote.Text = e.Note;

        if (e.Date != null)
        {
            txtDate.Text = e.Date.ToStringVN_Hour();
        }
        else
        {
            txtDate.Text = "";
        }

        txtDept.Text            = e.FullDepartment;
        txtRoom.Text            = e.Room;
        txtBed.Text             = e.Bed;
        txtDiagnosis.Text       = e.Diagnosis;
        txtPatientCode.Text     = e.PatientCode;
        txtTransfusionNote.Text = e.TransfusionNote;

        GridViewPack.DataBind();

        btnUpdate.Enabled = e.Status == Order.StatusX.Init;

        CurrentDIN             = "";
        imgCurrentDIN.ImageUrl = "none";

        GridViewSum.DataBind();
    }
Ejemplo n.º 20
0
    public void LoadOrder()
    {
        if (delete != null)
        {
            imgBarcode.ImageUrl = BarcodeBLL.Url4Delete(delete.ID);

            txtNote.Text  = delete.Note;
            lblActor.Text = delete.Actor;

            if (delete.Date != null)
            {
                txtDate.Text = delete.Date.ToStringVN_Hour();
            }
        }
    }
Ejemplo n.º 21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string code = Master.TextBoxCode.Text.Trim();

        Master.TextBoxCode.Text = "";

        if (BarcodeBLL.IsValidDINCode(code))
        {
            LoadDIN(BarcodeBLL.ParseDIN(code));
        }
        else if (BarcodeBLL.IsValidProductCode(code))
        {
            LoadPack(BarcodeBLL.ParseProductCode(code));
        }
    }
Ejemplo n.º 22
0
    public void LoadReturn()
    {
        if (returnObj != null)
        {
            imgBarcode.ImageUrl = BarcodeBLL.Url4Return(returnObj.ID);

            txtNote.Text  = returnObj.Note;
            lblActor.Text = returnObj.Actor;

            if (returnObj.Date != null)
            {
                txtDate.Text = returnObj.Date.ToStringVN_Hour();
            }
        }
    }
        public void LoadCampaign()
        {
            Campaign e = CampaignBLL.Get(CampaignID);

            if (e == null)
            {
            }
            else
            {
                ImageCodabar.ImageUrl = BarcodeBLL.Url4Campaign(e.ID);

                lblName.Text = e.Name;

                if (e.Date != null)
                {
                    lblDate.Text = e.Date.ToStringVN_Hour();
                }

                if (e.Source != null)
                {
                    lblSrc.Text = "Nguồn: " + e.Source.Name;
                }

                if (e.Est != null)
                {
                    lblEst.Text = "SL: " + e.Est.Value.ToString();
                }

                if (e.CoopOrgID != null)
                {
                    lblCoopOrg.Text = "Tổ chức: " + e.CoopOrg.Name;
                }

                if (e.HostOrgID != null)
                {
                    lblHostOrg.Text = "Địa điểm: " + e.HostOrg.Name;
                }

                if (!string.IsNullOrEmpty(e.ContactName))
                {
                    lblContactName.Text = "Người LH: " + e.ContactName;
                    lblTitle.Text       = "Chức vụ: " + e.ContactTitle;
                    lblPhone.Text       = "ĐT: " + e.ContactPhone;
                }

                lblNote.Text = "Ghi chú: " + e.Note;
            }
        }
Ejemplo n.º 24
0
    void LoadDIN(string code)
    {
        Donation e = DonationBLL.Get(code);

        if (e == null)
        {
        }
        else
        {
            DIN = e.DIN;
            ImageCurrentDIN.ImageUrl = BarcodeBLL.Url4DIN(e.DIN);

            ProductCode           = "";
            ImageProduct.ImageUrl = "none";
        }
    }
Ejemplo n.º 25
0
        public void LoadCampaign()
        {
            Campaign e = CampaignBLL.Get(CampaignID);

            if (e == null)
            {
            }
            else
            {
                imgCodabar.ImageUrl = BarcodeBLL.Url4Campaign(e.ID);

                txtName.Text = e.Name;

                if (e.Est != null)
                {
                    txtEst.Text = e.Est.Value.ToString();
                }


                if (e.Date != null)
                {
                    txtDate.Text = e.Date.ToStringVN_Hour();
                }

                ddlSource.SelectedValue = e.SourceID.ToString();

                if (e.Type == Campaign.TypeX.Long_run) //Infinity campaign
                {
                    chkInfiCam.Checked = true;
                }

                if (e.CoopOrgID != null)
                {
                    txtCoopOrgName.Text = e.CoopOrg.Name;
                }

                if (e.HostOrgID != null)
                {
                    txtHostOrgName.Text = e.HostOrg.Name;
                }

                txtContactName.Text  = e.ContactName;
                txtContactPhone.Text = e.ContactPhone;
                txtContactTitle.Text = e.ContactTitle;
                txtNote.Text         = e.Note;
            }
        }
Ejemplo n.º 26
0
    private void DINEnter(string code)
    {
        string tempDIN = BarcodeBLL.ParseDIN(code);

        RedBloodDataContext db = new RedBloodDataContext();
        Donation            d  = DonationBLL.Get(tempDIN);

        if (d == null)
        {
            this.Alert(DonationErrEnum.NonExist.Message);
            return;
        }

        if (d.PeopleID != null)
        {
            DIN            = tempDIN;
            ucPDL.PeopleID = d.PeopleID.Value;
            return;
        }

        if (ucPeople.PeopleID == Guid.Empty)
        {
            this.Alert("Chưa nhập thông tin người cho máu.");
            return;
        }
        if (CamDetailLeft.CampaignID == 0)
        {
            this.Alert("Chưa nhập thông tin đợt thu máu.");
            return;
        }

        DIN = tempDIN;

        DonationErr err = DonationBLL.Assign(DIN, ucPeople.PeopleID, CamDetailLeft.CampaignID);

        if (err != DonationErrEnum.Non)
        {
            this.Alert("Túi máu: " + err.Message);
        }
        else
        {
            ucPDL.ShowLog();
        }

        return;
    }
Ejemplo n.º 27
0
    public void LoadOrder()
    {
        Order e = new Order();

        if (OrderID == 0)
        {
            imgOrder.ImageUrl = "none";
            txtOrg.Text       = "";
            //People1.PeopleID = Guid.Empty;
        }
        else
        {
            e = OrderBLL.Get(OrderID);

            if (e.Type == Order.TypeX.ForOrg)
            {
                imgOrder.ImageUrl = BarcodeBLL.Url4Order(e.ID);
                txtOrg.Text       = e.Org != null ? e.Org.Name : "";
            }
            else if (e.Type == Order.TypeX.ForCR)
            {
                Response.Redirect(RedBloodSystem.Url4Order4CR + "key=" + e.ID.ToString());
            }
        }

        txtNote.Text = e.Note;

        if (e.Date != null)
        {
            txtDate.Text = e.Date.ToStringVN_Hour();
        }

        txtTransfusionNote.Text = e.TransfusionNote;

        GridViewPack.DataBind();

        btnUpdate.Enabled = e.Status == Order.StatusX.Init;

        urlPrint.NavigateUrl = ResolveClientUrl(string.Format("~/Store/PrintOrder.aspx?OrderID={0}", e.ID));

        CurrentDIN             = "";
        imgCurrentDIN.ImageUrl = "none";

        GridViewSum.DataBind();
    }
Ejemplo n.º 28
0
    public void LoadOrder()
    {
        if (order != null)
        {
            imgOrder.ImageUrl = BarcodeBLL.Url4Order(order.ID);
            txtOrg.Text       = order.Org != null ? order.Org.Name : "";
            lblOrgFooter.Text = txtOrg.Text;
            lblActor.Text     = order.Actor;
            txtNote.Text      = order.Note;

            if (order.Date != null)
            {
                txtDate.Text = order.Date.ToStringVN_Hour();
            }

            txtTransfusionNote.Text = order.TransfusionNote;
        }
    }
Ejemplo n.º 29
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            Master.TextBoxCode.Text = Master.TextBoxCode.Text.Trim();

            if (Master.TextBoxCode.Text.Length == 0)
            {
                return;
            }

            if (BarcodeBLL.IsValidCampaignCode(Master.TextBoxCode.Text))
            {
                CampaignEnter(Master.TextBoxCode.Text);
            }

            Master.TextBoxCode.Text = "";
        }
    }
Ejemplo n.º 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string code = Master.TextBoxCode.Text.Trim();

            Master.TextBoxCode.Text = "";

            if (code.Length == 0)
            {
                return;
            }

            if (BarcodeBLL.IsValidCampaignCode(code))
            {
                ucCampaign1.CampaignID = BarcodeBLL.ParseCampaignID(code);
            }
            else
            {
            }
        }