public void bindServicesType() { try { QuotationServicesModel[] objQuoSer = client.GetAllQuotationServices(ParlourId); ddlServices.DataTextField = "ServiceName"; ddlServices.DataValueField = "pkiServiceID"; ddlServices.DataSource = objQuoSer; ddlServices.DataBind(); ddlServices.Items.Insert(0, new ListItem("Select", "0")); QuotationDiscountModel objid = client.GetAllQuotationDiscounts(QuotationID); if (objid == null) { ViewState["DiscountID"] = "0"; } else { ViewState["DiscountID"] = objid.DiscountID; } } catch (Exception ex) { ShowMessage(ref lblMessage, MessageType.Danger, ex.Message); } }