protected void btnDel_Click(object sender, EventArgs e)
        {
            CheckBox cb;
            if (hdtype.Value == "0" || hdtype.Value == "")
            {
                CY.CSTS.Core.Business.ExhibitionInstrument exhibitionInstrument = new CY.CSTS.Core.Business.ExhibitionInstrument();
                for (int i = 0; i < gvInstrument.Rows.Count; i++)
                {
                    cb = (CheckBox)gvInstrument.Rows[i].FindControl("cbSelect");
                    if (cb.Checked)
                    {
                        try
                        {
                            Guid id = new Guid(gvInstrument.DataKeys[i].Value.ToString());
                            exhibitionInstrument = CY.CSTS.Core.Business.ExhibitionInstrument.Load(id);
                            exhibitionInstrument.DeleteOnSave();
                            exhibitionInstrument.Save();
                            DeleteTag(id);
                        }
                        catch (Exception ex)
                        {

                        }
                    }
                }
                bindgvInstrument();
            }
            else if (hdtype.Value == "1")
            {
                for (int i = 0; i < gvManufacturer.Rows.Count; i++)
                {
                    cb = (CheckBox)gvManufacturer.Rows[i].FindControl("cbSelect");
                    if (cb.Checked)
                    {
                        try
                        {
                            Guid id = new Guid(gvManufacturer.DataKeys[i].Value.ToString());
                            CY.CSTS.Core.Business.ExhibitionManufacturer exhibitionManufacture = CY.CSTS.Core.Business.ExhibitionManufacturer.Load(id);
                            exhibitionManufacture.DeleteOnSave();
                            exhibitionManufacture.Save();
                            DeleteTag(id);
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                }
                bindgvManufacturer();
            }
            else if (hdtype.Value == "2")
            {
                for (int i = 0; i < gvSupplyAndDemand.Rows.Count; i++)
                {
                    cb = (CheckBox)gvSupplyAndDemand.Rows[i].FindControl("cbSelect");
                    if (cb.Checked)
                    {
                        try
                        {
                            Guid id = new Guid(gvSupplyAndDemand.DataKeys[i].Value.ToString());
                            CY.CSTS.Core.Business.SupplyAndDemand supplyAndDemand = CY.CSTS.Core.Business.SupplyAndDemand.Load(id);
                            supplyAndDemand.DeleteOnSave();
                            supplyAndDemand.Save();
                            DeleteTag(id);
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                }
                bindgvSupplyAndDemand();
            }
        }
        public void ProcessRequest(HttpContext context)
        {
            //data:{gvType:$("#hdtype").val(),Id:$("#hdInstrumentId").html(),Number:$("#tbSequenceNumber").val(),ExDate:$("#tbDate").val(),RadioYes:$("#rdyes").attr("checked"),RadioNo:$("#rdno").attr("checked")},
            string InstrumentId = context.Request.Params["InstrumentId"].ToString();
            string ManufacturerId = context.Request.Params["ManufacturerId"].ToString();
            string json = string.Empty;
            string Exid = context.Request.Params["Exid"].ToString();
            string gvType = context.Request.Params["gvType"].ToString();
            string AddorModify = context.Request.Params["AddorModify"].ToString();
            string Number = context.Request.Params["Number"].ToString(); //context.Request.Form["Id"];
            string ExDate = context.Request.Params["ExDate"].ToString();
            string RadioYes = context.Request.Params["RadioYes"].ToString();
            string RadioNo = context.Request.Params["RadioNo"].ToString();
            string tag = context.Request.Params["tag"].ToString();
            try
            {
                if (AddorModify == "Add")
                {
                    if (gvType == "0" || gvType == "")
                    {
                        CY.CSTS.Core.Business.ExhibitionInstrument exhibitionInstrument = new CY.CSTS.Core.Business.ExhibitionInstrument();
                        if (InstrumentId != "")
                        {
                            Guid id = new Guid(InstrumentId);
                            exhibitionInstrument.InstrumentID = id;
                        }
                        exhibitionInstrument.SequenceNumber = int.Parse(Number);
                        exhibitionInstrument.ExhibitionDate = DateTime.Parse(ExDate);
                        //exhibitionInstrument.ExhibitionDate = ExDate;
                        if (RadioYes == "true" && RadioNo == "false")
                        {
                            exhibitionInstrument.IsShowinHomePage = 1;
                        }
                        else exhibitionInstrument.IsShowinHomePage = 2;
                        exhibitionInstrument.Save();
                        SaveTag(exhibitionInstrument.Id,tag);
                        json = "{success:true,msg:''}";

                        CY.CSTS.Core.Business.view_INSTRUMENT vInstru = CY.CSTS.Core.Business.view_INSTRUMENT.Load(new Guid(InstrumentId));

                    }
                    else if (gvType == "1")
                    {
                        CY.CSTS.Core.Business.ExhibitionManufacturer exhibitionManufacturer = new CY.CSTS.Core.Business.ExhibitionManufacturer();
                        if (ManufacturerId != "")
                        {
                            Guid id = new Guid(ManufacturerId);
                            exhibitionManufacturer.ManufacturerID = id;
                        }
                        exhibitionManufacturer.SequenceNumber = int.Parse(Number);
                        exhibitionManufacturer.InstrumentDate = DateTime.Parse(ExDate);
                        if (RadioYes == "true" && RadioNo == "false")
                        {
                            exhibitionManufacturer.IsShowinHomePage = 1;
                        }
                        else exhibitionManufacturer.IsShowinHomePage = 2;
                        exhibitionManufacturer.Save();
                        SaveTag(exhibitionManufacturer.Id, tag);
                        json = "{success:true,msg:''}";
                    }
                }
                else if (AddorModify == "Modify")
                {
                    if (gvType == "0" || gvType == "")
                    {
                        if (Exid != "")
                        {
                            Guid exid = new Guid(Exid);

                            CY.CSTS.Core.Business.ExhibitionInstrument exhibitionInstrument = CY.CSTS.Core.Business.ExhibitionInstrument.Load(exid);
                            exhibitionInstrument.SequenceNumber = int.Parse(Number);
                            exhibitionInstrument.ExhibitionDate = DateTime.Parse(ExDate);
                            if (RadioYes == "true" && RadioNo == "false")
                            {
                                exhibitionInstrument.IsShowinHomePage = 1;
                            }
                            else exhibitionInstrument.IsShowinHomePage = 2;
                            exhibitionInstrument.Save();
                            ModifyTag(exhibitionInstrument.Id,tag);
                            json = "{success:true,msg:''}";
                            //exhibitionInstrument.InstrumentID;
                        }
                    }
                    else if (gvType == "1")
                    {
                        Guid exid = new Guid(Exid);
                        CY.CSTS.Core.Business.ExhibitionManufacturer exhibitionManufacturer = CY.CSTS.Core.Business.ExhibitionManufacturer.Load(exid);
                        exhibitionManufacturer.SequenceNumber = int.Parse(Number);
                        exhibitionManufacturer.InstrumentDate = DateTime.Parse(ExDate);
                        if (RadioYes == "true" && RadioNo == "false")
                        {
                            exhibitionManufacturer.IsShowinHomePage = 1;
                        }
                        else exhibitionManufacturer.IsShowinHomePage = 2;
                        exhibitionManufacturer.Save();
                        ModifyTag(exhibitionManufacturer.Id,tag);
                        json = "{success:true,msg:''}";
                    }
                }
            }
            catch (Exception ex)
            {
                json = "{success:false,msg:" + ex.Message + "}";
            }
            context.Response.ContentType = "text/plain";
            context.Response.Write(json);
        }