public void Updateuserid() { if (Session["UserID"] != null) { if (Session["UserID"] != "") { using (cart obj = new cart()) { obj._userid = Convert.ToInt64(Session["UserID"].ToString()); obj._sessionid = Session["Current"].ToString(); obj._orderid = Convert.ToInt64("0"); obj.cart_updateuserid(); DataSet ds = new DataSet(); DataSet dsr = new DataSet(); ds = obj.cart_selectbyusoid(); dsr = obj.cart_selectbyuoid(); int i = dsr.Tables[0].Rows.Count; int j = ds.Tables[0].Rows.Count; if (i > j) { obj.cart_updatesessionid(); } } } } }