public BE_INFO GET_INFO(BE_INFO _Obj) { BE_INFO ITEM = new BE_INFO(); using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["cnBDAl4k0"].ConnectionString)) { try { cn.Open(); using (SqlCommand cm = new SqlCommand("[dbo].[SP_LOGIN]", cn)) { cm.CommandType = CommandType.StoredProcedure; cm.Parameters.AddWithValue("@vUsuario", _Obj.iCodEmpresa); using (SqlDataReader DR = cm.ExecuteReader()) { while (DR.Read()) { if (!DR.IsDBNull(DR.GetOrdinal("iTotal"))) { ITEM.iTotal = DR.GetDecimal(DR.GetOrdinal("iTotal")); } } } } cn.Close(); } catch (Exception excepcion) { throw (excepcion); } return(ITEM); } }
public BE_INFO GET_INFO(BE_INFO _obj) { DA_CARGO DA = new DA_CARGO(); try { return(DA.GET_INFO(_obj)); } catch (Exception excepcion) { throw (excepcion); } }
public ActionResult LoadInfo(BE_INFO _Obj) { Service1Client client = new Service1Client(); try { _Obj = client.GET_INFO(_Obj); } catch (Exception) { } return(Json(_Obj, JsonRequestBehavior.AllowGet)); }