コード例 #1
0
      public int getdashboardid_byroleid(int roleid)
      {
          Command             = new SqlCommand("usp_getdashboardid_byroleid", Connection);
          Command.CommandType = CommandType.StoredProcedure;

          SqlParameter prm_role_id = new SqlParameter("@role_id", SqlDbType.Int);

          prm_role_id.Value = roleid;
          Command.Parameters.Add(prm_role_id);

          object dt    = AdditionalExecuteCommand.ExecuteScalar(Command, "MasterDataAccess:getdashboardid_byroleid", "usp_getdashboardid_byroleid");
          int    dtInt = 0;

          if (dt != null)
          {
              dtInt = (int)dt;
          }
          return(dtInt);
      }
コード例 #2
0
      public string getusrlogin_byuserid()
      {
          Command             = new SqlCommand("usp_getusrlogin_byuserid", Connection);
          Command.CommandType = CommandType.StoredProcedure;

          SqlParameter prm_USR_ID = new SqlParameter("@USR_ID", SqlDbType.BigInt);

          prm_USR_ID.Value = ContentSession.USERID;
          Command.Parameters.Add(prm_USR_ID);

          SqlParameter prm_CTName = new SqlParameter("@CTName", SqlDbType.VarChar, 50);

          prm_CTName.Value = ContentSession.CTName;
          Command.Parameters.Add(prm_CTName);

          object dt     = AdditionalExecuteCommand.ExecuteScalar(Command, "MasterDataAccess:getusrlogin_byuserid", "usp_getusrlogin_byuserid");
          string result = string.Empty;

          if (dt != null)
          {
              result = dt.ToString();
          }
          return(result);
      }