コード例 #1
0
        public void BindAddonProductToUpdate()
        {
            AddonProductsModal model = client.EditAddonProductbyID(ProductID, ParlourId);

            if (model == null)
            {
                Response.Write("<script>alert('Sorry!you are not authorized to perform edit on this Branch.');</script>");
            }
            else
            {
                ProductID           = model.pkiProductID;
                txtDescription.Text = model.ProductDesc;
                txtPremium.Text     = model.ProductCost.ToString("#,0.00");
                txtCover.Text       = model.ProductCover.ToString("#,0.00");
                chkongoing.Checked  = false;
                if (model.IsProductOngoing == 1)
                {
                    chkongoing.Checked = true;
                }
                chkLaybye.Checked = false;
                if (model.IsProductLaybye == 1)
                {
                    chkLaybye.Checked = true;
                }
                txtAddonName.Text = model.ProductName;

                btnSubmite.Text = "Update";
            }
        }