Ejemplo n.º 1
0
    protected void btnSpecialGridItemEdit_Click(object sender, EventArgs e)
    {
        try
        {
            ImageButton btnImage = sender as ImageButton;
            int         index    = btnImage.CommandArgument != "" ? Convert.ToInt32(btnImage.CommandArgument) : -1;
            string      ItemID   = gvShoppingSpecial.DataKeys[index].Values[1].ToString();
            if (ItemID != string.Empty)
            {
                FacadeManager facade   = new FacadeManager();
                IShoppingCart cartItem = facade.GetACartItem(ItemID);
                if (cartItem != null)
                {
                    txtVan.Text = cartItem.ItemType.ToLower() == "c" ? cartItem.ItemCode : string.Empty;
                    txtItemDescCustomise.Text = cartItem.Description;
                    txtQuanityCustomise.Text  = Convert.ToDouble(cartItem.Quantity).ToString("#0,0.00", CultureInfo.CreateSpecificCulture("nl-NL"));
                    txtSellPrice.Text         = Convert.ToDouble(cartItem.PriceSell).ToString("#0,0.00", CultureInfo.CreateSpecificCulture("nl-NL"));
                    txtCostPrice.Text         = Convert.ToDouble(cartItem.PriceCost).ToString("#0,0.00", CultureInfo.CreateSpecificCulture("nl-NL"));
                    txtUnit.Text = cartItem.Unit;
                    lblTotalQuantityCustomise.Text = " / " + txtQuanityCustomise.Text;
                    txtRemarkCustomise.Text        = cartItem.Remark;
                    txtProdNodesCustomise.Text     = cartItem.ProductNotes;
                    chkToEdm.Checked     = cartItem.ToEdm == "0" ? false : true;
                    chkToProduct.Checked = cartItem.ToProduct == "0" ? false : true;

                    hdnItemIDCustomise.Value      = ItemID;
                    hdnCurrentGridforCustom.Value = EditingGrid.SPECIAL.ToString();
                    mpeSpecialItem.Show();
                }
            }
        }
        catch (Exception ex)
        {
        }
    }
Ejemplo n.º 2
0
 protected void btnAddSpecialItem_Click(object sender, EventArgs e)
 {
     try
     {
         string ItemID = string.Empty;
         if (gvSpCart.Rows.Count > 0)
         {
             ItemID = gvSpCart.DataKeys[0].Values[1].ToString();
         }
         if (gvShoppingSpecial.Rows.Count > 0)
         {
             ItemID = gvShoppingSpecial.DataKeys[0].Values[1].ToString();
         }
         if (ItemID != string.Empty)
         {
             FacadeManager facade   = new FacadeManager();
             IShoppingCart cartItem = facade.GetACartItem(ItemID);
             if (cartItem != null)
             {
                 txtAddSpDescription.Text = cartItem.Description;
                 mpeAddSpecialItem.Show();
             }
         }
     }
     catch (Exception ex)
     {
     }
 }
Ejemplo n.º 3
0
 protected void btnStandardGridItemEdit_Click(object sender, EventArgs e)
 {
     try
     {
         ImageButton btnImage = sender as ImageButton;
         int         index    = btnImage.CommandArgument != "" ? Convert.ToInt32(btnImage.CommandArgument) : -1;
         string      ItemID   = gvSpCart.DataKeys[index].Values[1].ToString();
         if (ItemID != string.Empty)
         {
             FacadeManager facade   = new FacadeManager();
             IShoppingCart cartItem = facade.GetACartItem(ItemID);
             if (cartItem != null)
             {
                 txtStdMatCode.Text     = cartItem.ItemCode;
                 txtStdDescription.Text = cartItem.Description;
                 txtStdQuantiry.Text    = Convert.ToDouble(cartItem.Quantity).ToString("#0,0.00", CultureInfo.CreateSpecificCulture("nl-NL"));
                 txtStdRemark.Text      = cartItem.Remark;
                 txtStdProdNote.Text    = cartItem.ProductNotes;
                 hdnItemID.Value        = ItemID;
                 hdnCurrentGrid.Value   = EditingGrid.STANDARD.ToString();
                 mpeStandardItem.Show();
             }
         }
     }
     catch (Exception ex)
     {
     }
 }