protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var totalType = new TypeName(); var totalManufacturer = new Manufacturer(); if (totalType.CountType() == 0 || totalManufacturer.CountManufacturer() == 0) { initializeSetupModal(); lblTypeAvailible.InnerText = totalType.CountType().ToString(); lblAvailibleManufacturer.InnerText = totalManufacturer.CountManufacturer().ToString(); } } }
protected void btnType_Click(object sender, EventArgs e) { var type = new TypeName(txtType.Value); type.AddTypeToDatabase(); lblTypeAvailible.InnerText = type.CountType().ToString(); initializeSetupModal(); NextSlide("carousel-init", 1); }