示例#1
0
        private void buttonSave_Click(object sender, EventArgs e)
        {
            int    itemunit    = (int)comboBoxUnit.SelectedValue;
            int    catogory    = (int)comboBoxCatagory.SelectedValue;
            string name        = textBoxName.Text;
            string discription = textBoxDiscription.Text;

            RepositeryResponce repositeryResponce = itemRepo.Save(new pos_item
            {
                id           = itemid,
                itemcategory = catogory,
                itemname     = name,
                unit         = itemunit,
                discreption  = discription,
            });

            if (repositeryResponce.sucsess)
            {
                loadGrid();
                ShowMessageSucsess(repositeryResponce.message);
            }
            else
            {
                ShowMessageError(repositeryResponce.message);
            }
        }