Пример #1
0
        public void BtnDelete_Click(object sender, EventArgs e)
        {
            int id = ConvertHelper.Cint(GridViewHelper.GetSelectedKey(Grid1, true));

            string[] eCell = Grid1.SelectedCell;

            JArray    upJson = Grid1.GetMergedData();
            DataTable da     = new DataTable();

            for (int i = 0; i < upJson.Count; i++)
            {
                if (upJson[i]["status"].ToString() != "newadded" && upJson[i]["id"].ToString() == eCell[0].ToString())
                {
                    int _id = ConvertHelper.Cint(upJson[i]["values"]["Id"].ToString());
                    Grid1.DeleteSelectedRows();
                    ORDER_DEP00Bll.GetInstence().DeleteOrderDep00(_id);
                    hidORDDEP_ID.Text = "";
                    break;
                }
                else if (upJson[i]["status"].ToString() == "newadded" && upJson[i]["id"].ToString() == eCell[0].ToString())
                {
                    Grid1.DeleteSelectedRows();
                    hidORDDEP_ID.Text = "";
                    break;
                }
            }
            LoadData2("");
            LoadDepData();
        }