protected void btnProduct_Click(object sender, EventArgs e)
    {
        try
        {
            if ((this.lblErrorMessage.Text.Length != 0) || (this.lblSuccessMessage.Text.Length != 0))
            {
                this.lblSuccessMessage.Text = "";
                this.lblErrorMessage.Text   = "";
            }

            if (this.ddlProductName.SelectedValue == "")
            {
                return;
            }

            ProductInfoDTO oProductInfoDTO = new ProductInfoDTO();

            Facade facade = Facade.GetInstance();

            if (this.ddlProductName.SelectedValue != "")
            {
                oProductInfoDTO              = ProductInfoBLImp.LoadProductInfoDTO((Guid)TypeDescriptor.GetConverter(oProductInfoDTO.PrimaryKey).ConvertFromString(this.ddlProductName.SelectedValue));
                this.txtOpeningQty.Text      = "1";
                this.txtOpeningRate.Text     = oProductInfoDTO.P_CostPrice.ToString("####.##");
                this.txtOpeningDiscount.Text = oProductInfoDTO.P_Discount.ToString("####.##");
                this.hfProductCode.Value     = oProductInfoDTO.P_Code;
                this.HiddenField1.Value      = oProductInfoDTO.PrimaryKey.ToString();
            }
        }
        catch (Exception exp)
        {
            lblErrorMessage.Text = cls.ErrorString(exp);
        }
        finally
        {
            ScriptManager1.SetFocus(txtOpeningDate);
        }
    }
Ejemplo n.º 2
0
 public IProductInfoBL GetPBLImp()
 {
     return(ProductInfoBLImp.GetInstance());
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Find Product Primary Key corresponding Product Code
        /// </summary>
        /// <param name="strCode"></param>
        /// <returns></returns>
        public Guid getProductPKInfoByCode(string strCode)
        {
            ProductInfoBLImp oProductInfoBLImp = new ProductInfoBLImp();

            return(oProductInfoBLImp.getProductPKByCode(strCode));
        }
Ejemplo n.º 4
0
 public ProductInfoDTO GetProductInfoDTO(Guid pk)
 {
     return(ProductInfoBLImp.LoadProductInfoDTO(pk));
 }