public JsonResult UpdateSequenceNumber_swap_move(ChoiceFilling obj) { ChoiceFillingRepository objRep = new ChoiceFillingRepository(); //obj.Type = "SWAP"; string localIP = "?"; localIP = Request.ServerVariables["REMOTE_ADDR"].ToString(); obj.CreatedIp = localIP; obj.studentid = Session["studentid"].ToString(); DataSet _ds = objRep.UpdateSequenceNumber_swap_move(obj); bool flag = true; if (_ds != null) { if (_ds.Tables[0].Rows.Count > 0) { if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "0") { flag = false; } } } return(Json(new { flag = flag }, JsonRequestBehavior.AllowGet )); }