Ejemplo n.º 1
0
        private void Update_ProdType_From_View()
        {
            DataAccessPOS dbPOS = new DataAccessPOS();

            //if (String.IsNullOrEmpty(txt_ConfigName.Text)) txt_ConfigName.Text = "";
            //if (String.IsNullOrEmpty(txt_ConfigValue.Text)) txt_ConfigValue.Text = "";
            //if (String.IsNullOrEmpty(txt_ConfigDesc.Text)) txt_ConfigDesc.Text = "";

            ptypes.Clear();
            ptypes.Add(new POS_ProductTypeModel()
            {
                Id              = int.Parse(txt_TypeID.Text),
                TypeName        = txt_TypeName.Text,
                IsLiquor        = check_Liquor.Checked,
                IsRestaurant    = check_Restaurant.Checked,
                IsBatchDonation = check_Donation.Checked,
                IsBatchDiscount = check_Discount.Checked
            });
            int iCnt = dbPOS.Update_ProductType(ptypes[0]);

            txtMessage.Text      = "Type successfully Updated : " + txt_TypeName.Text;
            txtMessage.ForeColor = Color.White;
        }