Пример #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int r = 0;
            ServeAtDoorstepData.CategoryDetails objCategory = new CategoryDetails();
            objCategory.CategoryID = 0;
            objCategory.CategoryName = txtcategory.Text.ToString().Trim();
            objCategory.CategoryDescription =txtcategoryDesc.Text.Trim();
            objService = new ServeAtDoorstepService();

            DataTable dt = objService.AvailableCategory(txtcategory.Text.ToString().Trim());
            if (dt.Rows.Count == 0 && txtcategory.Text.ToString().Trim() != "")
                r = objService.AddCategory(objCategory);
            txtcategory.Text = "";
            LoadCategory();
        }